diff --git a/build/org.eclipse.cdt.make.ui/plugin.xml b/build/org.eclipse.cdt.make.ui/plugin.xml
index 7300b7ba1cb..2f04eca4302 100644
--- a/build/org.eclipse.cdt.make.ui/plugin.xml
+++ b/build/org.eclipse.cdt.make.ui/plugin.xml
@@ -23,7 +23,7 @@
-
+
@@ -468,4 +468,8 @@
class="org.eclipse.cdt.make.ui.dialogs.DiscoveredPathContainerPage"
name="%DiscoveredScannerInfoContainer.name"
id="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
+
+
+
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIImages.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIImages.java
index 11ce7eb0825..ab10ff4d112 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIImages.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIImages.java
@@ -28,7 +28,7 @@ public class MakeUIImages {
private static URL fgIconBaseURL;
static {
try {
- fgIconBaseURL = new URL(MakeUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/"); //$NON-NLS-1$
+ fgIconBaseURL = new URL(MakeUIPlugin.getDefault().getBundle().getEntry("/"), "icons/"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (MalformedURLException e) {
MakeUIPlugin.log(e);
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPlugin.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPlugin.java
index d5abbccfe5d..c94ecce6f35 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPlugin.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPlugin.java
@@ -7,21 +7,19 @@ import java.util.ResourceBundle;
import org.eclipse.cdt.make.internal.ui.editor.IMakefileDocumentProvider;
import org.eclipse.cdt.make.internal.ui.editor.MakefileDocumentProvider;
import org.eclipse.cdt.make.internal.ui.editor.WorkingCopyManager;
-import org.eclipse.cdt.make.internal.ui.preferences.MakeTargetsPreferencePage;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
@@ -38,8 +36,7 @@ public class MakeUIPlugin extends AbstractUIPlugin {
/**
* The constructor.
*/
- public MakeUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public MakeUIPlugin() {
plugin = this;
try {
resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.make.internal.ui.MakeResources"); //$NON-NLS-1$
@@ -59,7 +56,7 @@ public class MakeUIPlugin extends AbstractUIPlugin {
* Returns the Uniqu idenetifier for this plugin.
*/
public static String getPluginId() {
- return getDefault().getDescriptor().getUniqueIdentifier();
+ return getDefault().getBundle().getSymbolicName();
}
/**
@@ -125,7 +122,7 @@ public class MakeUIPlugin extends AbstractUIPlugin {
// match the plugin id defined in plugin.xml
return "org.eclipse.cdt.make.ui"; //$NON-NLS-1$
}
- return getDefault().getDescriptor().getUniqueIdentifier();
+ return getDefault().getBundle().getSymbolicName();
}
public static void log(IStatus status) {
@@ -234,15 +231,15 @@ public class MakeUIPlugin extends AbstractUIPlugin {
return fWorkingCopyManager;
}
- public void shutdown() throws CoreException {
- super.shutdown();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
if (fWorkingCopyManager != null) {
- fWorkingCopyManager.shutdown();
- fWorkingCopyManager= null;
- }
- }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- MakeTargetsPreferencePage.initDefaults(store);
+ fWorkingCopyManager.shutdown();
+ fWorkingCopyManager= null;
+ }
+ super.stop(context);
}
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPreferenceInitializer.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPreferenceInitializer.java
new file mode 100644
index 00000000000..deec2232b9e
--- /dev/null
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeUIPreferenceInitializer.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2004 QNX Software Systems and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Common Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors: QNX Software Systems - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.cdt.make.internal.ui;
+
+import org.eclipse.cdt.make.internal.ui.preferences.MakeTargetsPreferencePage;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+
+
+public class MakeUIPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ public void initializeDefaultPreferences() {
+ MakeTargetsPreferencePage.initDefaults(MakeUIPlugin.getDefault().getPreferenceStore());
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
index 12e3eaad8f9..57559174928 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
@@ -13,7 +13,6 @@ package org.eclipse.cdt.make.internal.ui.editor;
import java.util.ResourceBundle;
import org.eclipse.cdt.make.core.makefile.IDirective;
-import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.internal.ui.text.MakefileColorManager;
import org.eclipse.cdt.make.internal.ui.text.makefile.MakefileWordDetector;
@@ -31,10 +30,13 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartService;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
@@ -47,7 +49,6 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
* The page that shows the outline.
*/
protected MakefileContentOutlinePage page;
- private IMakefile makefile;
private FindReplaceDocumentAdapter fFindReplaceDocumentAdapter;
public MakefileContentOutlinePage getOutlinePage() {
@@ -91,7 +92,6 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
*/
public void doSave(IProgressMonitor monitor) {
super.doSave(monitor);
- makefile = null;
if (page != null) {
page.update();
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenDeclarationAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenDeclarationAction.java
index 8cb7079665e..01d2d424fde 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenDeclarationAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenDeclarationAction.java
@@ -21,8 +21,6 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -92,7 +90,6 @@ public class OpenDeclarationAction extends TextEditorAction {
if (p != null) {
IEditorPart editorPart = IDE.openEditor(p, file, true);
if (editorPart instanceof MakefileEditor) {
- IStructuredSelection selection = new StructuredSelection(directive);
((MakefileEditor)editorPart).setSelection(directive, true);
}
return editorPart;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java
index 214c00a437c..10a68b3c227 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java
@@ -19,10 +19,8 @@ import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferencePageContainer;
-import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
@@ -74,9 +72,6 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer
noDefaultAndApplyButton();
}
- /**
- * @see PreferencePage#performOk
- */
public boolean performOk() {
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
@@ -104,9 +99,6 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer
return null;
}
- /**
- * @see DialogPage#setVisible(boolean)
- */
public void setVisible(boolean visible) {
super.setVisible(visible);
fOptionBlock.setVisible(visible);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
index 80a48e72967..3de8daaf9a7 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
@@ -207,7 +207,9 @@ public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
}
private void scanToBeginOfLine(ICharacterScanner scanner) {
- for (; scanner.getColumn() != 0; scanner.unread());
+ while(scanner.getColumn() != 0) {
+ scanner.unread();
+ }
}
private boolean sequenceDetected(ICharacterScanner scanner, char[] sequence) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/ScannerConfigOptionsDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/ScannerConfigOptionsDialog.java
index 9cb107aa0a8..e780c92679d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/ScannerConfigOptionsDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/ScannerConfigOptionsDialog.java
@@ -29,6 +29,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -221,8 +222,7 @@ public class ScannerConfigOptionsDialog extends Dialog {
* Fills console parser maps
*/
private void retrieveSIConsoleParsers() {
- IExtensionPoint ep = MakeCorePlugin.getDefault().getDescriptor().
- getExtensionPoint(MakeCorePlugin.SI_CONSOLE_PARSER_SIMPLE_ID);
+ IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.SI_CONSOLE_PARSER_SIMPLE_ID);
if (ep != null) {
IExtension[] extensions = ep.getExtensions();
for (int i = 0; i < extensions.length; ++i) {
@@ -278,13 +278,6 @@ public class ScannerConfigOptionsDialog extends Dialog {
return composite;
}
- /**
- *
- */
- private void storeCurrentValues() {
-
- }
-
private void createBuildOutputParserControls(Composite parent) {
// ControlFactory.insertSpace(parent, 1, 10);
Group bopGroup = ControlFactory.createGroup(parent,