-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from camac/synclistener
Synclistener final version
- Loading branch information
Showing
32 changed files
with
777 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
org.openntf.swiper/src/org/openntf/swiper/action/LaunchODPFolderAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/******************************************************************************* | ||
* Copyright 2017 Cameron Gregor (http://camerongregor.com) | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License | ||
*******************************************************************************/ | ||
package org.openntf.swiper.action; | ||
|
||
import java.awt.Desktop; | ||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.eclipse.core.resources.IProject; | ||
import org.eclipse.core.runtime.CoreException; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
import com.ibm.designer.domino.ide.resources.DominoResourcesPlugin; | ||
import com.ibm.designer.domino.ide.resources.NsfException; | ||
import com.ibm.designer.domino.ide.resources.project.IDominoDesignerProject; | ||
import com.ibm.designer.domino.team.action.SyncAction; | ||
import com.ibm.designer.domino.team.util.SyncUtil; | ||
|
||
public class LaunchODPFolderAction extends SyncAction { | ||
|
||
public LaunchODPFolderAction() { | ||
super(); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public LaunchODPFolderAction(int arg0) { | ||
super(arg0); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
@Override | ||
public void doExecute(IProgressMonitor monitor) { | ||
|
||
IProject p = this.getSourceProject(); | ||
|
||
if (p != null) { | ||
try { | ||
|
||
IDominoDesignerProject ddp = DominoResourcesPlugin.getDominoDesignerProject(p); | ||
IProject odp = SyncUtil.getAssociatedDiskProject(ddp, false); | ||
|
||
File odpFolder = odp.getLocation().toFile(); | ||
Desktop.getDesktop().open(odpFolder); | ||
|
||
} catch (CoreException e) { | ||
e.printStackTrace(); | ||
} catch (NsfException e) { | ||
e.printStackTrace(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} | ||
|
||
@Override | ||
protected String getTaskName() { | ||
return "Open ODP Folder"; | ||
} | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
org.openntf.swiper/src/org/openntf/swiper/action/RefreshODPAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/******************************************************************************* | ||
* Copyright 2017 Cameron Gregor (http://camerongregor.com) | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License | ||
*******************************************************************************/ | ||
package org.openntf.swiper.action; | ||
|
||
import org.eclipse.core.resources.IProject; | ||
import org.eclipse.core.resources.IResource; | ||
import org.eclipse.core.runtime.CoreException; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
import com.ibm.designer.domino.ide.resources.DominoResourcesPlugin; | ||
import com.ibm.designer.domino.ide.resources.NsfException; | ||
import com.ibm.designer.domino.ide.resources.project.IDominoDesignerProject; | ||
import com.ibm.designer.domino.team.util.SyncUtil; | ||
|
||
public class RefreshODPAction extends SyncAction { | ||
|
||
public RefreshODPAction() { | ||
super(); | ||
} | ||
|
||
public RefreshODPAction(int arg0) { | ||
super(arg0); | ||
} | ||
|
||
@Override | ||
public void doExecute(IProgressMonitor monitor) { | ||
|
||
IProject p = this.getSourceProject(); | ||
|
||
if (p != null) { | ||
try { | ||
|
||
IDominoDesignerProject ddp = DominoResourcesPlugin.getDominoDesignerProject(p); | ||
IProject odp = SyncUtil.getAssociatedDiskProject(ddp, false); | ||
|
||
odp.refreshLocal(IResource.DEPTH_INFINITE, monitor); | ||
|
||
} catch (CoreException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} catch (NsfException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} | ||
|
||
@Override | ||
protected String getTaskName() { | ||
return "Refreshing On-Disk Project"; | ||
} | ||
|
||
} |
Oops, something went wrong.