mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
remove runtime.compatibility dependency
This commit is contained in:
parent
e661886b30
commit
c9e432ac40
9 changed files with 51 additions and 42 deletions
|
@ -23,7 +23,7 @@
|
|||
<import plugin="org.eclipse.cdt.core"/>
|
||||
<import plugin="org.eclipse.cdt.ui"/>
|
||||
<import plugin="org.eclipse.cdt.make.core"/>
|
||||
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
||||
<import plugin="org.eclipse.core.runtime"/>
|
||||
</requires>
|
||||
|
||||
|
||||
|
@ -468,4 +468,8 @@
|
|||
class="org.eclipse.cdt.make.ui.dialogs.DiscoveredPathContainerPage"
|
||||
name="%DiscoveredScannerInfoContainer.name"
|
||||
id="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer class="org.eclipse.cdt.make.internal.ui.MakeUIPreferenceInitializer"/>
|
||||
</extension></plugin>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue