|
Lines 19-24
Link Here
|
| 19 |
import java.util.SortedSet; |
19 |
import java.util.SortedSet; |
| 20 |
|
20 |
|
| 21 |
import org.eclipse.jface.dialogs.IDialogSettings; |
21 |
import org.eclipse.jface.dialogs.IDialogSettings; |
|
|
22 |
import org.eclipse.jface.viewers.ISelection; |
| 23 |
import org.eclipse.jface.viewers.IStructuredSelection; |
| 22 |
import org.eclipse.osgi.util.NLS; |
24 |
import org.eclipse.osgi.util.NLS; |
| 23 |
import org.eclipse.swt.SWT; |
25 |
import org.eclipse.swt.SWT; |
| 24 |
import org.eclipse.swt.events.SelectionAdapter; |
26 |
import org.eclipse.swt.events.SelectionAdapter; |
|
Lines 32-38
Link Here
|
| 32 |
import org.eclipse.swt.widgets.Display; |
34 |
import org.eclipse.swt.widgets.Display; |
| 33 |
import org.eclipse.swt.widgets.Group; |
35 |
import org.eclipse.swt.widgets.Group; |
| 34 |
import org.eclipse.swt.widgets.Shell; |
36 |
import org.eclipse.swt.widgets.Shell; |
|
|
37 |
import org.eclipse.ui.IWorkingSet; |
| 35 |
import org.eclipse.ui.PlatformUI; |
38 |
import org.eclipse.ui.PlatformUI; |
|
|
39 |
import org.eclipse.ui.dialogs.WorkingSetConfigurationBlock; |
| 40 |
import org.eclipse.ui.dialogs.WorkingSetGroup; |
| 36 |
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties; |
41 |
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties; |
| 37 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; |
42 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; |
| 38 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor; |
43 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor; |
|
Lines 67-75
Link Here
|
| 67 |
private static final String NULL_RUNTIME = "NULL_RUNTIME"; //$NON-NLS-1$ |
72 |
private static final String NULL_RUNTIME = "NULL_RUNTIME"; //$NON-NLS-1$ |
| 68 |
private static final String MRU_RUNTIME_STORE = "MRU_RUNTIME_STORE"; //$NON-NLS-1$ |
73 |
private static final String MRU_RUNTIME_STORE = "MRU_RUNTIME_STORE"; //$NON-NLS-1$ |
| 69 |
|
74 |
|
|
|
75 |
private static final String RESOURCE_WORKING_SET = "org.eclipse.ui.resourceWorkingSetPage"; //$NON-NLS-1$ |
| 76 |
private static final String JAVA_WORKING_SET = "org.eclipse.jdt.ui.JavaWorkingSetPage"; //$NON-NLS-1$ |
| 77 |
|
| 70 |
protected IProjectFacet primaryProjectFacet = null; |
78 |
protected IProjectFacet primaryProjectFacet = null; |
| 71 |
protected Combo primaryVersionCombo = null; |
79 |
protected Combo primaryVersionCombo = null; |
| 72 |
|
80 |
|
|
|
81 |
protected WorkingSetGroup workingSetGroup; |
| 82 |
|
| 73 |
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion ) |
83 |
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion ) |
| 74 |
{ |
84 |
{ |
| 75 |
final Set<IProjectFacetVersion> config = new HashSet<IProjectFacetVersion>(); |
85 |
final Set<IProjectFacetVersion> config = new HashSet<IProjectFacetVersion>(); |
|
Lines 117-122
Link Here
|
| 117 |
createServerTargetComposite(top); |
127 |
createServerTargetComposite(top); |
| 118 |
createPrimaryFacetComposite(top); |
128 |
createPrimaryFacetComposite(top); |
| 119 |
createPresetPanel(top); |
129 |
createPresetPanel(top); |
|
|
130 |
createWorkingSetGroupPanel(top); |
| 120 |
return top; |
131 |
return top; |
| 121 |
} |
132 |
} |
| 122 |
|
133 |
|
|
Lines 629-632
Link Here
|
| 629 |
return null; |
640 |
return null; |
| 630 |
} |
641 |
} |
| 631 |
|
642 |
|
|
|
643 |
protected WorkingSetGroup createWorkingSetGroup(Composite composite, |
| 644 |
IStructuredSelection selection, String[] supportedWorkingSetTypes) { |
| 645 |
if (workingSetGroup != null) |
| 646 |
return workingSetGroup; |
| 647 |
workingSetGroup = new WorkingSetGroup(composite, selection, |
| 648 |
supportedWorkingSetTypes); |
| 649 |
return workingSetGroup; |
| 650 |
} |
| 651 |
|
| 652 |
protected WorkingSetGroup createWorkingSetGroupPanel(Composite composite) { |
| 653 |
IStructuredSelection structuredSelection = null; |
| 654 |
ISelection currentSelection = PlatformUI.getWorkbench() |
| 655 |
.getActiveWorkbenchWindow().getSelectionService() |
| 656 |
.getSelection(); |
| 657 |
if (currentSelection instanceof IStructuredSelection) { |
| 658 |
structuredSelection = (IStructuredSelection) currentSelection; |
| 659 |
} |
| 660 |
WorkingSetGroup group = createWorkingSetGroup(composite, structuredSelection, |
| 661 |
new String[] { RESOURCE_WORKING_SET, JAVA_WORKING_SET }); |
| 662 |
return group; |
| 663 |
} |
| 664 |
|
| 665 |
public IWorkingSet[] getSelectedWorkingSets() { |
| 666 |
return workingSetGroup == null ? new IWorkingSet[0] : workingSetGroup |
| 667 |
.getSelectedWorkingSets(); |
| 668 |
} |
| 632 |
} |
669 |
} |