|
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 33-38
Link Here
|
| 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; |
| 35 |
import org.eclipse.ui.PlatformUI; |
37 |
import org.eclipse.ui.PlatformUI; |
|
|
38 |
import org.eclipse.ui.dialogs.WorkingSetConfigurationBlock; |
| 39 |
import org.eclipse.ui.dialogs.WorkingSetGroup; |
| 36 |
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties; |
40 |
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties; |
| 37 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; |
41 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; |
| 38 |
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor; |
42 |
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$ |
71 |
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$ |
72 |
private static final String MRU_RUNTIME_STORE = "MRU_RUNTIME_STORE"; //$NON-NLS-1$ |
| 69 |
|
73 |
|
|
|
74 |
|
| 75 |
|
| 70 |
protected IProjectFacet primaryProjectFacet = null; |
76 |
protected IProjectFacet primaryProjectFacet = null; |
| 71 |
protected Combo primaryVersionCombo = null; |
77 |
protected Combo primaryVersionCombo = null; |
| 72 |
|
78 |
|
|
|
79 |
private WorkingSetGroup workingSetGroup; |
| 80 |
|
| 73 |
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion ) |
81 |
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion ) |
| 74 |
{ |
82 |
{ |
| 75 |
final Set<IProjectFacetVersion> config = new HashSet<IProjectFacetVersion>(); |
83 |
final Set<IProjectFacetVersion> config = new HashSet<IProjectFacetVersion>(); |
|
Lines 117-122
Link Here
|
| 117 |
createServerTargetComposite(top); |
125 |
createServerTargetComposite(top); |
| 118 |
createPrimaryFacetComposite(top); |
126 |
createPrimaryFacetComposite(top); |
| 119 |
createPresetPanel(top); |
127 |
createPresetPanel(top); |
|
|
128 |
createWorkingSetGroupPanel(top); |
| 120 |
return top; |
129 |
return top; |
| 121 |
} |
130 |
} |
| 122 |
|
131 |
|
|
Lines 595-598
Link Here
|
| 595 |
return null; |
604 |
return null; |
| 596 |
} |
605 |
} |
| 597 |
|
606 |
|
|
|
607 |
|
| 608 |
|
| 609 |
|
| 610 |
public WorkingSetGroup createWorkingSetGroup(Composite composite, |
| 611 |
IStructuredSelection selection, String[] supportedWorkingSetTypes) { |
| 612 |
if (workingSetGroup != null) |
| 613 |
return workingSetGroup; |
| 614 |
workingSetGroup = new WorkingSetGroup(composite, selection, |
| 615 |
supportedWorkingSetTypes); |
| 616 |
return workingSetGroup; |
| 617 |
} |
| 618 |
|
| 619 |
public WorkingSetGroup createWorkingSetGroupPanel(Composite composite) { |
| 620 |
IStructuredSelection structuredSelection = null; |
| 621 |
ISelection currentSelection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); |
| 622 |
if (currentSelection instanceof IStructuredSelection) { |
| 623 |
structuredSelection = (IStructuredSelection) currentSelection; |
| 624 |
} |
| 625 |
final WorkingSetGroup group = createWorkingSetGroup(composite, structuredSelection, |
| 626 |
new String[] { "org.eclipse.ui.resourceWorkingSetPage", "org.eclipse.jdt.ui.JavaWorkingSetPage" } ); |
| 627 |
return group; |
| 628 |
} |
| 598 |
} |
629 |
} |