Lines 19-25
Link Here
|
19 |
import java.lang.reflect.InvocationTargetException; |
19 |
import java.lang.reflect.InvocationTargetException; |
20 |
import java.net.URI; |
20 |
import java.net.URI; |
21 |
import java.net.URL; |
21 |
import java.net.URL; |
22 |
import java.util.Iterator; |
|
|
23 |
|
22 |
|
24 |
import org.eclipse.core.commands.ExecutionException; |
23 |
import org.eclipse.core.commands.ExecutionException; |
25 |
import org.eclipse.core.resources.IFolder; |
24 |
import org.eclipse.core.resources.IFolder; |
Lines 27-33
Link Here
|
27 |
import org.eclipse.core.resources.IWorkspace; |
26 |
import org.eclipse.core.resources.IWorkspace; |
28 |
import org.eclipse.core.resources.ResourcesPlugin; |
27 |
import org.eclipse.core.resources.ResourcesPlugin; |
29 |
import org.eclipse.core.runtime.CoreException; |
28 |
import org.eclipse.core.runtime.CoreException; |
30 |
import org.eclipse.core.runtime.IAdaptable; |
|
|
31 |
import org.eclipse.core.runtime.IPath; |
29 |
import org.eclipse.core.runtime.IPath; |
32 |
import org.eclipse.core.runtime.IProgressMonitor; |
30 |
import org.eclipse.core.runtime.IProgressMonitor; |
33 |
import org.eclipse.core.runtime.IStatus; |
31 |
import org.eclipse.core.runtime.IStatus; |
Lines 53-58
Link Here
|
53 |
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; |
51 |
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; |
54 |
import org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup; |
52 |
import org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup; |
55 |
|
53 |
|
|
|
54 |
import eu.geclipse.core.model.IGridContainer; |
55 |
import eu.geclipse.core.model.IGridElement; |
56 |
import eu.geclipse.core.model.IGridProject; |
57 |
import eu.geclipse.workflow.IGridWorkflowDescription; |
56 |
import eu.geclipse.workflow.ui.internal.WorkflowDiagramEditorPlugin; |
58 |
import eu.geclipse.workflow.ui.internal.WorkflowDiagramEditorPlugin; |
57 |
import eu.geclipse.workflow.ui.part.Messages; |
59 |
import eu.geclipse.workflow.ui.part.Messages; |
58 |
|
60 |
|
Lines 309-333
Link Here
|
309 |
/** |
311 |
/** |
310 |
* Initializes this page's controls. |
312 |
* Initializes this page's controls. |
311 |
*/ |
313 |
*/ |
312 |
protected void initializePage() { |
314 |
protected void initializePage() { |
313 |
Iterator it = this.currentSelection.iterator(); |
315 |
Object o = this.currentSelection.getFirstElement(); |
314 |
if( it.hasNext() ) { |
316 |
if (o instanceof IGridContainer) { |
315 |
Object next = it.next(); |
317 |
IGridElement e = (IGridElement)o; |
316 |
IResource selectedResource = null; |
318 |
IGridProject project = e.getProject(); |
317 |
if( next instanceof IResource ) { |
319 |
IPath path = null; |
318 |
selectedResource = ( IResource )next; |
320 |
if (project != null) { |
319 |
} else if( next instanceof IAdaptable ) { |
321 |
IGridElement workflows = project.getProjectFolder( IGridWorkflowDescription.class ); |
320 |
selectedResource = ( IResource )( ( IAdaptable )next ).getAdapter( IResource.class ); |
322 |
if( workflows != null ) { |
321 |
} |
323 |
path = workflows.getPath(); |
322 |
if( selectedResource != null ) { |
324 |
} else { |
323 |
if( selectedResource.getType() == IResource.FILE ) { |
325 |
path = project.getPath(); |
324 |
selectedResource = selectedResource.getParent(); |
|
|
325 |
} |
326 |
if( selectedResource.isAccessible() ) { |
327 |
this.resourceGroup.setContainerFullPath( selectedResource.getFullPath() ); |
328 |
} |
326 |
} |
329 |
} |
327 |
} |
330 |
} |
328 |
this.resourceGroup.setContainerFullPath( path ); |
|
|
329 |
} |
331 |
setPageComplete( false ); |
330 |
setPageComplete( false ); |
332 |
} |
331 |
} |
333 |
|
332 |
|