|
Lines 14-20
Link Here
|
| 14 |
|
14 |
|
| 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.*; |
| 18 |
import org.eclipse.jface.action.*; |
18 |
import org.eclipse.jface.action.*; |
| 19 |
import org.eclipse.jface.viewers.*; |
19 |
import org.eclipse.jface.viewers.*; |
| 20 |
import org.eclipse.jface.window.Window; |
20 |
import org.eclipse.jface.window.Window; |
|
Lines 23-30
Link Here
|
| 23 |
import org.eclipse.pde.internal.core.*; |
23 |
import org.eclipse.pde.internal.core.*; |
| 24 |
import org.eclipse.pde.internal.core.feature.FeatureImport; |
24 |
import org.eclipse.pde.internal.core.feature.FeatureImport; |
| 25 |
import org.eclipse.pde.internal.core.ifeature.*; |
25 |
import org.eclipse.pde.internal.core.ifeature.*; |
| 26 |
import org.eclipse.pde.internal.ui.PDEPlugin; |
26 |
import org.eclipse.pde.internal.ui.*; |
| 27 |
import org.eclipse.pde.internal.ui.PDEUIMessages; |
|
|
| 28 |
import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog; |
27 |
import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog; |
| 29 |
import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog; |
28 |
import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog; |
| 30 |
import org.eclipse.pde.internal.ui.editor.*; |
29 |
import org.eclipse.pde.internal.ui.editor.*; |
|
Lines 36-41
Link Here
|
| 36 |
import org.eclipse.swt.SWT; |
35 |
import org.eclipse.swt.SWT; |
| 37 |
import org.eclipse.swt.custom.BusyIndicator; |
36 |
import org.eclipse.swt.custom.BusyIndicator; |
| 38 |
import org.eclipse.swt.dnd.Clipboard; |
37 |
import org.eclipse.swt.dnd.Clipboard; |
|
|
38 |
import org.eclipse.swt.events.SelectionAdapter; |
| 39 |
import org.eclipse.swt.events.SelectionEvent; |
| 39 |
import org.eclipse.swt.graphics.Cursor; |
40 |
import org.eclipse.swt.graphics.Cursor; |
| 40 |
import org.eclipse.swt.layout.GridData; |
41 |
import org.eclipse.swt.layout.GridData; |
| 41 |
import org.eclipse.swt.widgets.*; |
42 |
import org.eclipse.swt.widgets.*; |
|
Lines 44-49
Link Here
|
| 44 |
import org.eclipse.ui.actions.ActionFactory; |
45 |
import org.eclipse.ui.actions.ActionFactory; |
| 45 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
46 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
| 46 |
import org.eclipse.ui.forms.widgets.Section; |
47 |
import org.eclipse.ui.forms.widgets.Section; |
|
|
48 |
import org.osgi.service.prefs.Preferences; |
| 47 |
|
49 |
|
| 48 |
public class RequiresSection extends TableSection implements IPluginModelListener, IFeatureModelListener { |
50 |
public class RequiresSection extends TableSection implements IPluginModelListener, IFeatureModelListener { |
| 49 |
private Button fSyncButton; |
51 |
private Button fSyncButton; |
|
Lines 98-103
Link Here
|
| 98 |
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
100 |
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
| 99 |
gd.horizontalSpan = 2; |
101 |
gd.horizontalSpan = 2; |
| 100 |
fSyncButton.setLayoutData(gd); |
102 |
fSyncButton.setLayoutData(gd); |
|
|
103 |
fSyncButton.addSelectionListener(new SelectionAdapter() { |
| 104 |
@Override |
| 105 |
public void widgetSelected(SelectionEvent e) { |
| 106 |
Preferences prefs = Platform.getPreferencesService().getRootNode().node(Plugin.PLUGIN_PREFERENCE_SCOPE).node(IPDEUIConstants.PLUGIN_ID); |
| 107 |
prefs.putBoolean("fsyncButton", fSyncButton.getSelection()); //$NON-NLS-1$ |
| 108 |
} |
| 109 |
}); |
| 101 |
|
110 |
|
| 102 |
createViewerPartControl(container, SWT.MULTI, 2, toolkit); |
111 |
createViewerPartControl(container, SWT.MULTI, 2, toolkit); |
| 103 |
|
112 |
|
|
Lines 404-409
Link Here
|
| 404 |
getTablePart().setButtonEnabled(3, false); |
413 |
getTablePart().setButtonEnabled(3, false); |
| 405 |
fSyncButton.setEnabled(false); |
414 |
fSyncButton.setEnabled(false); |
| 406 |
} |
415 |
} |
|
|
416 |
Preferences prefs = Platform.getPreferencesService().getRootNode().node(Plugin.PLUGIN_PREFERENCE_SCOPE).node(IPDEUIConstants.PLUGIN_ID); |
| 417 |
fSyncButton.setSelection(prefs.getBoolean("fsyncButton", false)); //$NON-NLS-1$ |
| 407 |
model.addModelChangedListener(this); |
418 |
model.addModelChangedListener(this); |
| 408 |
PDECore.getDefault().getModelManager().addPluginModelListener(this); |
419 |
PDECore.getDefault().getModelManager().addPluginModelListener(this); |
| 409 |
PDECore.getDefault().getFeatureModelManager().addFeatureModelListener(this); |
420 |
PDECore.getDefault().getFeatureModelManager().addFeatureModelListener(this); |