|
Lines 15-20
Link Here
|
| 15 |
import java.util.ArrayList; |
15 |
import java.util.ArrayList; |
| 16 |
import java.util.Iterator; |
16 |
import java.util.Iterator; |
| 17 |
import org.eclipse.core.runtime.CoreException; |
17 |
import org.eclipse.core.runtime.CoreException; |
|
|
18 |
import org.eclipse.core.runtime.Platform; |
| 19 |
import org.eclipse.core.runtime.preferences.InstanceScope; |
| 18 |
import org.eclipse.jface.action.*; |
20 |
import org.eclipse.jface.action.*; |
| 19 |
import org.eclipse.jface.viewers.*; |
21 |
import org.eclipse.jface.viewers.*; |
| 20 |
import org.eclipse.jface.window.Window; |
22 |
import org.eclipse.jface.window.Window; |
|
Lines 23-30
Link Here
|
| 23 |
import org.eclipse.pde.internal.core.*; |
25 |
import org.eclipse.pde.internal.core.*; |
| 24 |
import org.eclipse.pde.internal.core.feature.FeatureImport; |
26 |
import org.eclipse.pde.internal.core.feature.FeatureImport; |
| 25 |
import org.eclipse.pde.internal.core.ifeature.*; |
27 |
import org.eclipse.pde.internal.core.ifeature.*; |
| 26 |
import org.eclipse.pde.internal.ui.PDEPlugin; |
28 |
import org.eclipse.pde.internal.ui.*; |
| 27 |
import org.eclipse.pde.internal.ui.PDEUIMessages; |
|
|
| 28 |
import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog; |
29 |
import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog; |
| 29 |
import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog; |
30 |
import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog; |
| 30 |
import org.eclipse.pde.internal.ui.editor.*; |
31 |
import org.eclipse.pde.internal.ui.editor.*; |
|
Lines 36-41
Link Here
|
| 36 |
import org.eclipse.swt.SWT; |
37 |
import org.eclipse.swt.SWT; |
| 37 |
import org.eclipse.swt.custom.BusyIndicator; |
38 |
import org.eclipse.swt.custom.BusyIndicator; |
| 38 |
import org.eclipse.swt.dnd.Clipboard; |
39 |
import org.eclipse.swt.dnd.Clipboard; |
|
|
40 |
import org.eclipse.swt.events.SelectionAdapter; |
| 41 |
import org.eclipse.swt.events.SelectionEvent; |
| 39 |
import org.eclipse.swt.graphics.Cursor; |
42 |
import org.eclipse.swt.graphics.Cursor; |
| 40 |
import org.eclipse.swt.layout.GridData; |
43 |
import org.eclipse.swt.layout.GridData; |
| 41 |
import org.eclipse.swt.widgets.*; |
44 |
import org.eclipse.swt.widgets.*; |
|
Lines 87-92
Link Here
|
| 87 |
@Override |
90 |
@Override |
| 88 |
public void createClient(Section section, FormToolkit toolkit) { |
91 |
public void createClient(Section section, FormToolkit toolkit) { |
| 89 |
|
92 |
|
|
|
93 |
final IFeatureModel model = (IFeatureModel) getPage().getModel(); |
| 90 |
section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); |
94 |
section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); |
| 91 |
GridData data = new GridData(GridData.FILL_BOTH); |
95 |
GridData data = new GridData(GridData.FILL_BOTH); |
| 92 |
section.setLayoutData(data); |
96 |
section.setLayoutData(data); |
|
Lines 98-103
Link Here
|
| 98 |
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
102 |
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
| 99 |
gd.horizontalSpan = 2; |
103 |
gd.horizontalSpan = 2; |
| 100 |
fSyncButton.setLayoutData(gd); |
104 |
fSyncButton.setLayoutData(gd); |
|
|
105 |
fSyncButton.addSelectionListener(new SelectionAdapter() { |
| 106 |
@Override |
| 107 |
public void widgetSelected(SelectionEvent e) { |
| 108 |
InstanceScope.INSTANCE.getNode(IPDEUIConstants.PLUGIN_ID).putBoolean(model.getFeature().getLabel(), fSyncButton.getSelection()); |
| 109 |
} |
| 110 |
}); |
| 101 |
|
111 |
|
| 102 |
createViewerPartControl(container, SWT.MULTI, 2, toolkit); |
112 |
createViewerPartControl(container, SWT.MULTI, 2, toolkit); |
| 103 |
|
113 |
|
|
Lines 404-409
Link Here
|
| 404 |
getTablePart().setButtonEnabled(3, false); |
414 |
getTablePart().setButtonEnabled(3, false); |
| 405 |
fSyncButton.setEnabled(false); |
415 |
fSyncButton.setEnabled(false); |
| 406 |
} |
416 |
} |
|
|
417 |
// Preferences prefs = Platform.getPreferencesService().getRootNode().node(Plugin.PLUGIN_PREFERENCE_SCOPE).node(IPDEUIConstants.PLUGIN_ID); |
| 418 |
fSyncButton.setSelection(Platform.getPreferencesService().getBoolean(IPDEUIConstants.PLUGIN_ID, model.getFeature().getLabel(), false, null)); |
| 407 |
model.addModelChangedListener(this); |
419 |
model.addModelChangedListener(this); |
| 408 |
PDECore.getDefault().getModelManager().addPluginModelListener(this); |
420 |
PDECore.getDefault().getModelManager().addPluginModelListener(this); |
| 409 |
PDECore.getDefault().getFeatureModelManager().addFeatureModelListener(this); |
421 |
PDECore.getDefault().getFeatureModelManager().addFeatureModelListener(this); |