mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
new Build Console management
This commit is contained in:
parent
e4a57a52b7
commit
abc8c1ae28
92 changed files with 1126 additions and 769 deletions
|
@ -1,3 +1,119 @@
|
||||||
|
2002-10-29 David Inglis
|
||||||
|
|
||||||
|
Refactor ui.internal.CPlugin to ui.CUIPlugin with method to get the new
|
||||||
|
IBuildConsoleManager interface.
|
||||||
|
New BuildConsoleView which shows console on selected IProject plus tracks console
|
||||||
|
of active build.
|
||||||
|
|
||||||
|
org.eclipse.cdt.ui/plugin.xml
|
||||||
|
src/org/eclipse/cdt/internal/corext/template/Templates.java
|
||||||
|
src/org/eclipse/cdt/internal/corext/template/c/CContext.java
|
||||||
|
src/org/eclipse/cdt/internal/corext/textmanipulation/TextBuffer.java
|
||||||
|
src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferEditor.java
|
||||||
|
src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferFactory.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/BinaryPropertySource.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CCompletionContributorManager.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CContentProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CElementImageProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CElementLabelProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CElementProperties.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CElementPropertySource.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CPluginImages.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CUIStatus.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/ErrorTickAdornmentProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/ResourceAdapterFactory.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/StandardCElementLabelProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/compare/CMergeViewer.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/CElementFilters.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/CPatternFilter.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/CView.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/FilterSelectionAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/FiltersContentProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/cview/ShowLibrariesAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/CEditor.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/GotoErrorAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/LexicalSortingAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/OpenOnSelectionAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/OverviewRuler.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/SearchForReferencesAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/asm/AsmTextEditor.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/editor/asm/AsmTextTools.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/CLaunchingPropertyPage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/CProjectPropertyPage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/preferences/TemplatePreferencePage.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CAnnotationHover.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CAutoIndentStrategy.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CCompletionProcessor.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CFormattingStrategy.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/CTextTools.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/ContentAssistPreference.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/link/LinkedPositionManager.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/link/LinkedPositionUI.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/template/TemplateProposal.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/text/template/TemplateVariableProposal.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/util/ProblemMarkerManager.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/wizards/OpenNewFileWizardAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/wizards/OpenNewFolderWizardAction.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/CProjectWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/CProjectWizardPage.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/ReferenceBlock.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/SettingsBlock.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/StdCCWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/StdCWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/StdMakeProjectWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/ConversionWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/ConvertCtoCCStdMakeProjectWizardPage.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/ConvertSimpleToCCStdMakeProjectWizardPage.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/ConvertSimpleToCStdMakeProjectWizardPage.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/CtoCCConversionWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/SimpleToCCStdMakeConversionWizard.java
|
||||||
|
src/org/eclipse/cdt/ui/wizards/conversion/SimpleToCStdMakeConversionWizard.java
|
||||||
|
|
||||||
|
- do to refactor (import changes and CPlugin to CUIPlugin).
|
||||||
|
|
||||||
|
src/org/eclipse/cdt/internal/ui/makeview/MakeAction.java
|
||||||
|
- no longer use console session attributes here.
|
||||||
|
|
||||||
|
src/org/eclipse/cdt/internal/ui/CPlugin.java
|
||||||
|
- moved from internal and renamed to CUIPlugin.java
|
||||||
|
|
||||||
|
src/org/eclipse/cdt/internal/ui/BuildConsoleAction.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/BuildConsoleView.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/ClearConsoleAction.java
|
||||||
|
- new Build console
|
||||||
|
- shows console on selected project.
|
||||||
|
- shows console of active build.
|
||||||
|
|
||||||
|
src/org/eclipse/cdt/ui/CUIPlugin.java
|
||||||
|
- added method getBuildManager()
|
||||||
|
- refactored BuildConsole management into manager class
|
||||||
|
|
||||||
|
src/org/eclipse/cdt/ui/IBuildConsoleEvent.java
|
||||||
|
src/org/eclipse/cdt/ui/IBuildConsoleListener.java
|
||||||
|
src/org/eclipse/cdt/ui/IBuildConsoleManager.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/BuildConsole.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/CConsole.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/ConsoleEvent.java
|
||||||
|
src/org/eclipse/cdt/internal/ui/BuildConsoleManager.java
|
||||||
|
- new build manager and interfaces for managing and tracking console activity.
|
||||||
|
|
||||||
|
|
||||||
2002-10-28 David Inglis
|
2002-10-28 David Inglis
|
||||||
|
|
||||||
* /src/.../ui/cview/CView.java
|
* /src/.../ui/cview/CView.java
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name="%pluginName"
|
name="%pluginName"
|
||||||
version="1.0.0"
|
version="1.0.0"
|
||||||
provider-name="%providerName"
|
provider-name="%providerName"
|
||||||
class="org.eclipse.cdt.internal.ui.CPlugin">
|
class="org.eclipse.cdt.ui.CUIPlugin">
|
||||||
|
|
||||||
<runtime>
|
<runtime>
|
||||||
<library name="cdtui.jar">
|
<library name="cdtui.jar">
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
<extension-point id="CCompletionContributor" name="%completionContributorName"/>
|
<extension-point id="CCompletionContributor" name="%completionContributorName"/>
|
||||||
<extension-point id="CElementFilters" name="%elementFiltersName"/>
|
<extension-point id="CElementFilters" name="%elementFiltersName"/>
|
||||||
<!-- =========================================================================== -->
|
<!-- =========================================================================== -->
|
||||||
<!-- Extension Implementation: must implement org.eclipse.jface.text.ITextHover -->
|
|
||||||
<!-- Purpose: Provide a perspective specific text hovering for CEditor files -->
|
|
||||||
<!-- Extension point: org.eclipse.cdt.ui.textHovers -->
|
<!-- Extension point: org.eclipse.cdt.ui.textHovers -->
|
||||||
|
<!-- Purpose: Provide a perspective specific text hovering for CEditor files -->
|
||||||
|
<!-- Extension Implementation: must implement org.eclipse.jface.text.ITextHover -->
|
||||||
<!-- =========================================================================== -->
|
<!-- =========================================================================== -->
|
||||||
<extension-point id="textHovers" name="%textHoversName"/>
|
<extension-point id="textHovers" name="%textHoversName"/>
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
name="%BuildConsoleView.name"
|
name="%BuildConsoleView.name"
|
||||||
icon="icons/full/cview16/buildconsole.gif"
|
icon="icons/full/cview16/buildconsole.gif"
|
||||||
category="org.eclipse.cdt.ui.views"
|
category="org.eclipse.cdt.ui.views"
|
||||||
class="org.eclipse.cdt.internal.ui.BuildConsoleView"
|
class="org.eclipse.cdt.internal.ui.buildconsole.BuildConsoleView"
|
||||||
id="org.eclipse.cdt.ui.BuildConsoleView">
|
id="org.eclipse.cdt.ui.BuildConsoleView">
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
|
@ -131,9 +131,16 @@
|
||||||
class="org.eclipse.cdt.internal.ui.cview.CView"
|
class="org.eclipse.cdt.internal.ui.cview.CView"
|
||||||
id="org.eclipse.cdt.ui.CView">
|
id="org.eclipse.cdt.ui.CView">
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
name="%MakeView.name"
|
||||||
|
icon="icons/full/obj16/build_menu.gif"
|
||||||
|
category="org.eclipse.cdt.ui.views"
|
||||||
|
class="org.eclipse.cdt.internal.ui.makeview.MakeView"
|
||||||
|
id="org.eclipse.cdt.ui.MakeView">
|
||||||
|
</view>
|
||||||
</extension>
|
</extension>
|
||||||
<!-- The wizards -->
|
|
||||||
<!-- For C Wizards -->
|
<!-- For C Wizards -->
|
||||||
|
<!-- The wizards -->
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.newWizards">
|
point="org.eclipse.ui.newWizards">
|
||||||
<category
|
<category
|
||||||
|
@ -281,28 +288,6 @@
|
||||||
</action>
|
</action>
|
||||||
</editorContribution>
|
</editorContribution>
|
||||||
</extension>
|
</extension>
|
||||||
<!--
|
|
||||||
<page
|
|
||||||
objectClass="org.eclipse.core.resources.IFile"
|
|
||||||
name="%CLaunchingPropertyPage.executionArguments.name"
|
|
||||||
class="org.eclipse.cdt.internal.ui.preferences.CLaunchingPropertyPage"
|
|
||||||
id="org.eclipse.cdt.ui.preferences.CLaunchingPropertyPage">
|
|
||||||
</page>
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.debug.core.launchers">
|
|
||||||
<launcher
|
|
||||||
label="%CApplicationLauncher.label"
|
|
||||||
description="%CApplicationLauncher.description"
|
|
||||||
wizard="org.eclipse.cdt.internal.ui.wizards.CLaunchWizard"
|
|
||||||
modes="run"
|
|
||||||
class="org.eclipse.cdt.internal.core.CApplicationLauncher"
|
|
||||||
labelProvider="org.eclipse.cdt.internal.ui.CElementLabelProvider"
|
|
||||||
id="org.eclipse.cdt.core.CApplicationLauncher">
|
|
||||||
</launcher>
|
|
||||||
</extension>
|
|
||||||
-->
|
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.popupMenus">
|
point="org.eclipse.ui.popupMenus">
|
||||||
<objectContribution
|
<objectContribution
|
||||||
|
@ -429,17 +414,6 @@
|
||||||
</action>
|
</action>
|
||||||
</actionSet>
|
</actionSet>
|
||||||
</extension>
|
</extension>
|
||||||
<!-- Wizards ToolBar buttons -->
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.ui.views">
|
|
||||||
<view
|
|
||||||
name="%MakeView.name"
|
|
||||||
icon="icons/full/obj16/build_menu.gif"
|
|
||||||
category="org.eclipse.cdt.ui.views"
|
|
||||||
class="org.eclipse.cdt.internal.ui.makeview.MakeView"
|
|
||||||
id="org.eclipse.cdt.ui.MakeView">
|
|
||||||
</view>
|
|
||||||
</extension>
|
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.projectNatureImages">
|
point="org.eclipse.ui.projectNatureImages">
|
||||||
<image
|
<image
|
||||||
|
@ -461,7 +435,7 @@
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.cdt.core.CBuildConsole">
|
point="org.eclipse.cdt.core.CBuildConsole">
|
||||||
<CBuildConsole
|
<CBuildConsole
|
||||||
class="org.eclipse.cdt.internal.ui.CConsole">
|
class="org.eclipse.cdt.internal.ui.BuildConsole">
|
||||||
</CBuildConsole>
|
</CBuildConsole>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ package org.eclipse.cdt.internal.corext.template;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ public class Templates extends TemplateSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
ErrorDialog.openError(null,
|
ErrorDialog.openError(null,
|
||||||
TemplateMessages.getString("Templates.error.title"), //$NON-NLS-1$
|
TemplateMessages.getString("Templates.error.title"), //$NON-NLS-1$
|
||||||
e.getMessage(), e.getStatus());
|
e.getMessage(), e.getStatus());
|
||||||
|
@ -87,7 +88,7 @@ public class Templates extends TemplateSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static File getTemplateFile() {
|
private static File getTemplateFile() {
|
||||||
IPath path= CPlugin.getDefault().getStateLocation();
|
IPath path= CUIPlugin.getDefault().getStateLocation();
|
||||||
path= path.append(TEMPLATE_FILE);
|
path= path.append(TEMPLATE_FILE);
|
||||||
|
|
||||||
return path.toFile();
|
return path.toFile();
|
||||||
|
|
|
@ -12,8 +12,8 @@ import org.eclipse.cdt.internal.corext.template.TemplateBuffer;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateTranslator;
|
import org.eclipse.cdt.internal.corext.template.TemplateTranslator;
|
||||||
import org.eclipse.cdt.internal.corext.textmanipulation.TextBuffer;
|
import org.eclipse.cdt.internal.corext.textmanipulation.TextBuffer;
|
||||||
import org.eclipse.cdt.internal.corext.textmanipulation.TextUtil;
|
import org.eclipse.cdt.internal.corext.textmanipulation.TextUtil;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class CContext extends CompilationUnitContext {
|
||||||
TextBuffer textBuffer= TextBuffer.create(string);
|
TextBuffer textBuffer= TextBuffer.create(string);
|
||||||
String lineContent= textBuffer.getLineContentOfOffset(start);
|
String lineContent= textBuffer.getLineContentOfOffset(start);
|
||||||
|
|
||||||
return TextUtil.getIndent(lineContent, CPlugin.getDefault().getPreferenceStore().getInt(CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH));
|
return TextUtil.getIndent(lineContent, CUIPlugin.getDefault().getPreferenceStore().getInt(CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH));
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -13,8 +13,8 @@ import org.eclipse.jface.text.ILineTracker;
|
||||||
import org.eclipse.jface.text.IRegion;
|
import org.eclipse.jface.text.IRegion;
|
||||||
import org.eclipse.jface.util.Assert;
|
import org.eclipse.jface.util.Assert;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -262,7 +262,7 @@ public class TextBuffer {
|
||||||
try {
|
try {
|
||||||
fDocument.replace(offset, length, text);
|
fDocument.replace(offset, length, text);
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
IStatus s= new Status(IStatus.ERROR, CPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR,
|
IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR,
|
||||||
TextManipulationMessages.getFormattedString(
|
TextManipulationMessages.getFormattedString(
|
||||||
"TextBuffer.wrongRange", //$NON-NLS-1$
|
"TextBuffer.wrongRange", //$NON-NLS-1$
|
||||||
new Object[] {new Integer(offset), new Integer(length) } ), e);
|
new Object[] {new Integer(offset), new Integer(length) } ), e);
|
||||||
|
|
|
@ -17,8 +17,8 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.util.Assert;
|
import org.eclipse.jface.util.Assert;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.corext.textmanipulation.TextEditNode.RootNode;
|
import org.eclipse.cdt.internal.corext.textmanipulation.TextEditNode.RootNode;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
/**
|
/**
|
||||||
* A <code>TextBufferEditor</code> manages a set of <code>TextEdit</code>s and applies
|
* A <code>TextBufferEditor</code> manages a set of <code>TextEdit</code>s and applies
|
||||||
* them as a whole to a <code>TextBuffer</code>. Added <code>TextEdit</code>s must
|
* them as a whole to a <code>TextBuffer</code>. Added <code>TextEdit</code>s must
|
||||||
|
@ -164,7 +164,7 @@ public class TextBufferEditor {
|
||||||
if (fRootNode == null) {
|
if (fRootNode == null) {
|
||||||
fRootNode= buildTree();
|
fRootNode= buildTree();
|
||||||
if (fRootNode == null || !fRootNode.validate(fBuffer.getLength())) {
|
if (fRootNode == null || !fRootNode.validate(fBuffer.getLength())) {
|
||||||
IStatus s= new Status(IStatus.ERROR, CPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR,
|
IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR,
|
||||||
"RootNode empty", null);
|
"RootNode empty", null);
|
||||||
throw new CoreException(s);
|
throw new CoreException(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,9 @@ package org.eclipse.cdt.internal.corext.textmanipulation;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
import org.eclipse.cdt.internal.ui.CStatusConstants;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
@ -53,7 +54,7 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
|
||||||
public TextBufferFactory() {
|
public TextBufferFactory() {
|
||||||
// XXX http://dev.eclipse.org/bugs/show_bug.cgi?id=5170
|
// XXX http://dev.eclipse.org/bugs/show_bug.cgi?id=5170
|
||||||
// Need way to map a file to a document without knowing any kind of document provider.
|
// Need way to map a file to a document without knowing any kind of document provider.
|
||||||
this(CPlugin.getDefault().getDocumentProvider());
|
this(CUIPlugin.getDefault().getDocumentProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextBufferFactory(IDocumentProvider provider) {
|
public TextBufferFactory(IDocumentProvider provider) {
|
||||||
|
@ -145,7 +146,7 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
|
||||||
document.set(buffer.toString());
|
document.set(buffer.toString());
|
||||||
return new TextBuffer(document);
|
return new TextBuffer(document);
|
||||||
} catch (IOException x) {
|
} catch (IOException x) {
|
||||||
IStatus s= new Status(IStatus.ERROR, CPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR, x.getMessage(), x);
|
IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR, x.getMessage(), x);
|
||||||
throw new CoreException(s);
|
throw new CoreException(s);
|
||||||
} finally {
|
} finally {
|
||||||
if (in != null) {
|
if (in != null) {
|
||||||
|
@ -183,7 +184,7 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void throwNotManaged() throws CoreException {
|
private void throwNotManaged() throws CoreException {
|
||||||
IStatus s= new Status(IStatus.ERROR, CPlugin.PLUGIN_ID,
|
IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID,
|
||||||
CStatusConstants.INTERNAL_ERROR, "TextBufferFactory.bufferNotManaged", null); //$NON-NLS-1$
|
CStatusConstants.INTERNAL_ERROR, "TextBufferFactory.bufferNotManaged", null); //$NON-NLS-1$
|
||||||
throw new CoreException(s);
|
throw new CoreException(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.eclipse.ui.views.properties.FilePropertySource;
|
||||||
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.IBinary;
|
import org.eclipse.cdt.core.model.IBinary;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
public class BinaryPropertySource extends FilePropertySource {
|
public class BinaryPropertySource extends FilePropertySource {
|
||||||
|
|
||||||
|
@ -33,42 +34,42 @@ public class BinaryPropertySource extends FilePropertySource {
|
||||||
*/
|
*/
|
||||||
private static IPropertyDescriptor[] getInitialPropertyDescriptor() {
|
private static IPropertyDescriptor[] getInitialPropertyDescriptor() {
|
||||||
// cpu name
|
// cpu name
|
||||||
String cpuName= CPlugin.getResourceString(ELF_CPU);
|
String cpuName= CUIPlugin.getResourceString(ELF_CPU);
|
||||||
PropertyDescriptor cpuDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_CPU, cpuName);
|
PropertyDescriptor cpuDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_CPU, cpuName);
|
||||||
cpuDescriptor.setAlwaysIncompatible(true);
|
cpuDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf text
|
// elf text
|
||||||
String textName = CPlugin.getResourceString(ELF_TEXT);
|
String textName = CUIPlugin.getResourceString(ELF_TEXT);
|
||||||
PropertyDescriptor textDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_TEXT, textName);
|
PropertyDescriptor textDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_TEXT, textName);
|
||||||
textDescriptor.setAlwaysIncompatible(true);
|
textDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf data
|
// elf data
|
||||||
String dataName = CPlugin.getResourceString(ELF_DATA);
|
String dataName = CUIPlugin.getResourceString(ELF_DATA);
|
||||||
PropertyDescriptor dataDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_DATA, dataName);
|
PropertyDescriptor dataDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_DATA, dataName);
|
||||||
dataDescriptor.setAlwaysIncompatible(true);
|
dataDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf bss
|
// elf bss
|
||||||
String bssName = CPlugin.getResourceString(ELF_BSS);
|
String bssName = CUIPlugin.getResourceString(ELF_BSS);
|
||||||
PropertyDescriptor bssDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_BSS, bssName);
|
PropertyDescriptor bssDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_BSS, bssName);
|
||||||
bssDescriptor.setAlwaysIncompatible(true);
|
bssDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf type
|
// elf type
|
||||||
String typeName = CPlugin.getResourceString(ELF_TYPE);
|
String typeName = CUIPlugin.getResourceString(ELF_TYPE);
|
||||||
PropertyDescriptor typeDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_TYPE, typeName);
|
PropertyDescriptor typeDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_TYPE, typeName);
|
||||||
bssDescriptor.setAlwaysIncompatible(true);
|
bssDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf needed
|
// elf needed
|
||||||
String neededName = CPlugin.getResourceString(ELF_NEEDED);
|
String neededName = CUIPlugin.getResourceString(ELF_NEEDED);
|
||||||
PropertyDescriptor neededDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_NEEDED, neededName);
|
PropertyDescriptor neededDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_NEEDED, neededName);
|
||||||
bssDescriptor.setAlwaysIncompatible(true);
|
bssDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf soname
|
// elf soname
|
||||||
String sonameName = CPlugin.getResourceString(ELF_SONAME);
|
String sonameName = CUIPlugin.getResourceString(ELF_SONAME);
|
||||||
PropertyDescriptor sonameDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_SONAME, sonameName);
|
PropertyDescriptor sonameDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_SONAME, sonameName);
|
||||||
bssDescriptor.setAlwaysIncompatible(true);
|
bssDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
// elf debug
|
// elf debug
|
||||||
String debugName = CPlugin.getResourceString(ELF_HAS_DEBUG);
|
String debugName = CUIPlugin.getResourceString(ELF_HAS_DEBUG);
|
||||||
PropertyDescriptor debugDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_HAS_DEBUG, debugName);
|
PropertyDescriptor debugDescriptor= new PropertyDescriptor(ICElementPropertyConstants.P_ELF_HAS_DEBUG, debugName);
|
||||||
bssDescriptor.setAlwaysIncompatible(true);
|
bssDescriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
|
|
|
@ -6,37 +6,36 @@ package org.eclipse.cdt.internal.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.ConsoleOutputStream;
|
import org.eclipse.cdt.core.ConsoleOutputStream;
|
||||||
import org.eclipse.cdt.core.resources.IConsole;
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
import org.eclipse.cdt.core.resources.MakeUtil;
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
|
||||||
public class CConsole implements IConsole {
|
public class BuildConsole implements IConsole {
|
||||||
|
IProject project;
|
||||||
|
IBuildConsoleManager fConsoleManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for CConsole.
|
* Constructor for BuildConsole.
|
||||||
*/
|
*/
|
||||||
public CConsole() {
|
public BuildConsole() {
|
||||||
super();
|
fConsoleManager = CUIPlugin.getDefault().getConsoleManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start(IProject project ) {
|
public void start(IProject project ) {
|
||||||
if (CPluginPreferencePage.isClearBuildConsole()
|
this.project = project;
|
||||||
&& MakeUtil.getSessionConsoleMode(project)) {
|
fConsoleManager.getConsole(project).start(project);
|
||||||
clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.resources.IConsole#clear()
|
* @see org.eclipse.cdt.core.resources.IConsole#clear()
|
||||||
*/
|
*/
|
||||||
public void clear() {
|
public void clear() {
|
||||||
CPlugin.getDefault().getConsole().clear();
|
fConsoleManager.getConsole(project).clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.resources.IConsole#getOutputStream()
|
* @see org.eclipse.cdt.core.resources.IConsole#getOutputStream()
|
||||||
*/
|
*/
|
||||||
public ConsoleOutputStream getOutputStream() {
|
public ConsoleOutputStream getOutputStream() {
|
||||||
return CPlugin.getDefault().getConsole().getOutputStream();
|
return fConsoleManager.getConsole(project).getOutputStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software System Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.internal.ui;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.ConsoleOutputStream;
|
||||||
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
|
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleListener;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleManager;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
|
import org.eclipse.core.resources.IResourceChangeEvent;
|
||||||
|
import org.eclipse.core.resources.IResourceChangeListener;
|
||||||
|
import org.eclipse.jface.text.BadLocationException;
|
||||||
|
import org.eclipse.jface.text.Document;
|
||||||
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
import org.eclipse.jface.util.ListenerList;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
import org.eclipse.ui.IViewPart;
|
||||||
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PartInitException;
|
||||||
|
|
||||||
|
public class BuildConsoleManager implements IBuildConsoleManager, IResourceChangeListener {
|
||||||
|
private HashMap fConsoleDocumentMap;
|
||||||
|
ListenerList listeners = new ListenerList(1);
|
||||||
|
|
||||||
|
private class BuildConsole extends ConsoleOutputStream implements IConsole {
|
||||||
|
protected IDocument fDocument;
|
||||||
|
|
||||||
|
public BuildConsole() {
|
||||||
|
fDocument = new Document();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void start(IProject project) {
|
||||||
|
if (CPluginPreferencePage.isClearBuildConsole() ) {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
Object[] list = listeners.getListeners();
|
||||||
|
if ( list .length > 0 ) {
|
||||||
|
for ( int i = 0; i < list.length; i++ ) {
|
||||||
|
IBuildConsoleListener listener = (IBuildConsoleListener)list[i];
|
||||||
|
ConsoleEvent event = new ConsoleEvent(project, ConsoleEvent.CONSOLE_START);
|
||||||
|
listener.consoleChange(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
super.clear();
|
||||||
|
Display.getDefault().syncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
fDocument.set("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConsoleOutputStream getOutputStream() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDocument getDocument() {
|
||||||
|
return fDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void flush() throws IOException {
|
||||||
|
super.flush();
|
||||||
|
Display.getDefault().asyncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
if (CPluginPreferencePage.isConsoleOnTop())
|
||||||
|
bringConsoleOnTop();
|
||||||
|
try {
|
||||||
|
int len = fDocument.getLength();
|
||||||
|
fDocument.replace(len, 0, readBuffer());
|
||||||
|
}
|
||||||
|
catch (BadLocationException x) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void bringConsoleOnTop() {
|
||||||
|
IWorkbenchWindow window = CUIPlugin.getActiveWorkbenchWindow();
|
||||||
|
if (window == null)
|
||||||
|
return;
|
||||||
|
IWorkbenchPage page = window.getActivePage();
|
||||||
|
if (page != null) {
|
||||||
|
try {
|
||||||
|
// show the build console
|
||||||
|
IViewPart cBuild = page.findView(CUIPlugin.CONSOLE_ID);
|
||||||
|
if (cBuild == null) {
|
||||||
|
if (CPluginPreferencePage.isAutoOpenConsole()) {
|
||||||
|
IWorkbenchPart activePart = page.getActivePart();
|
||||||
|
cBuild = page.showView(CUIPlugin.CONSOLE_ID);
|
||||||
|
//restore focus
|
||||||
|
page.activate(activePart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
page.bringToTop(cBuild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (PartInitException pie) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BuildConsoleManager() {
|
||||||
|
fConsoleDocumentMap = new HashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Traverses the delta looking for added/removed/changed launch
|
||||||
|
* configuration files.
|
||||||
|
*
|
||||||
|
* @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
|
||||||
|
*/
|
||||||
|
public void resourceChanged(IResourceChangeEvent event) {
|
||||||
|
if ( fConsoleDocumentMap == null ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
IResource resource = event.getResource();
|
||||||
|
if ( event.getType() == IResourceChangeEvent.PRE_DELETE ) {
|
||||||
|
if(resource.getType() == IResource.PROJECT ) {
|
||||||
|
fConsoleDocumentMap.remove(resource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void shutdown() {
|
||||||
|
CUIPlugin.getWorkspace().removeResourceChangeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startup() {
|
||||||
|
CUIPlugin.getWorkspace().addResourceChangeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BuildConsole getBuildConsole(IProject project) {
|
||||||
|
BuildConsole console = (BuildConsole) fConsoleDocumentMap.get(project);
|
||||||
|
if (console == null) {
|
||||||
|
console = new BuildConsole();
|
||||||
|
fConsoleDocumentMap.put(project, console);
|
||||||
|
}
|
||||||
|
return console;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConsole getConsole(IProject project) {
|
||||||
|
return getBuildConsole(project);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDocument getConsoleDocument(IProject project) {
|
||||||
|
return getBuildConsole(project).getDocument();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addConsoleListener(IBuildConsoleListener listener) {
|
||||||
|
listeners.add(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeConsoleListener(IBuildConsoleListener listener) {
|
||||||
|
listeners.remove(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,216 +0,0 @@
|
||||||
package org.eclipse.cdt.internal.ui;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
|
||||||
import org.eclipse.jface.action.IMenuListener;
|
|
||||||
import org.eclipse.jface.action.IMenuManager;
|
|
||||||
import org.eclipse.jface.action.MenuManager;
|
|
||||||
import org.eclipse.jface.action.Separator;
|
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
|
||||||
import org.eclipse.jface.resource.JFaceResources;
|
|
||||||
import org.eclipse.jface.text.IDocument;
|
|
||||||
import org.eclipse.jface.text.ITextListener;
|
|
||||||
import org.eclipse.jface.text.TextEvent;
|
|
||||||
import org.eclipse.jface.text.TextViewer;
|
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
|
||||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.custom.StyledText;
|
|
||||||
import org.eclipse.swt.graphics.Font;
|
|
||||||
import org.eclipse.swt.graphics.FontData;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
|
||||||
import org.eclipse.swt.widgets.Control;
|
|
||||||
import org.eclipse.swt.widgets.Menu;
|
|
||||||
import org.eclipse.ui.IActionBars;
|
|
||||||
import org.eclipse.ui.help.WorkbenchHelp;
|
|
||||||
import org.eclipse.ui.part.ViewPart;
|
|
||||||
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
|
|
||||||
import org.eclipse.ui.texteditor.TextEditorAction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Console view for the desktop. Registered using XML.
|
|
||||||
*/
|
|
||||||
public class BuildConsoleView extends ViewPart {
|
|
||||||
|
|
||||||
|
|
||||||
protected TextViewer fTextViewer;
|
|
||||||
private ClearConsoleAction fClearOutputAction;
|
|
||||||
private TextEditorAction fCopyAction;
|
|
||||||
private TextEditorAction fSelectAllAction;
|
|
||||||
private Font fFont;
|
|
||||||
|
|
||||||
private IPropertyChangeListener fPropertyChangeListener;
|
|
||||||
|
|
||||||
|
|
||||||
public BuildConsoleView() {
|
|
||||||
super();
|
|
||||||
fFont= null;
|
|
||||||
fPropertyChangeListener= new IPropertyChangeListener() {
|
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
|
||||||
if (fTextViewer != null && event.getProperty().equals(CPluginPreferencePage.PREF_CONSOLE_FONT)) {
|
|
||||||
initializeWidgetFont(fTextViewer.getTextWidget());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
IPreferenceStore store= CPlugin.getDefault().getPreferenceStore();
|
|
||||||
store.addPropertyChangeListener(fPropertyChangeListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeActions() {
|
|
||||||
ResourceBundle bundle= CPlugin.getResourceBundle();
|
|
||||||
|
|
||||||
IActionBars actionBars= getViewSite().getActionBars();
|
|
||||||
fClearOutputAction= new ClearConsoleAction(this);
|
|
||||||
fCopyAction= new BuildConsoleAction(bundle, "Editor.Copy.", fTextViewer, fTextViewer.COPY);
|
|
||||||
fSelectAllAction= new BuildConsoleAction(bundle, "Editor.SelectAll.", fTextViewer, fTextViewer.SELECT_ALL);
|
|
||||||
|
|
||||||
|
|
||||||
actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, fCopyAction);
|
|
||||||
actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction);
|
|
||||||
|
|
||||||
fTextViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
|
||||||
public void selectionChanged(SelectionChangedEvent e) {
|
|
||||||
// ensures that the copyAction updates is doability when the selections tate changes
|
|
||||||
fCopyAction.update();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// addTextListener(new ITextListener() {
|
|
||||||
// public void textChanged(TextEvent event) {
|
|
||||||
// fCopyAction.update();
|
|
||||||
// fSelectAllAction.update();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ViewPart#createPartControl
|
|
||||||
*/
|
|
||||||
public void createPartControl(Composite parent) {
|
|
||||||
fTextViewer= new TextViewer(parent, SWT.V_SCROLL|SWT.H_SCROLL|SWT.WRAP|SWT.MULTI);
|
|
||||||
fTextViewer.setDocument(CPlugin.getDefault().getConsoleDocument());
|
|
||||||
fTextViewer.addTextListener(new ITextListener() {
|
|
||||||
public void textChanged(TextEvent event) {
|
|
||||||
revealEndOfDocument();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
fTextViewer.setEditable(false);
|
|
||||||
initializeWidgetFont(fTextViewer.getTextWidget());
|
|
||||||
|
|
||||||
|
|
||||||
initializeActions();
|
|
||||||
initializeContextMenu(parent);
|
|
||||||
initializeToolBar();
|
|
||||||
|
|
||||||
WorkbenchHelp.setHelp(fTextViewer.getControl(), ICHelpContextIds.CLEAR_CONSOLE_VIEW);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void initializeWidgetFont(StyledText styledText) {
|
|
||||||
IPreferenceStore store= CPlugin.getDefault().getPreferenceStore();
|
|
||||||
String prefKey= CPluginPreferencePage.PREF_CONSOLE_FONT;
|
|
||||||
FontData data= null;
|
|
||||||
if (store.contains(prefKey) && !store.isDefault(prefKey)) {
|
|
||||||
data= PreferenceConverter.getFontData(store, prefKey);
|
|
||||||
} else {
|
|
||||||
data= PreferenceConverter.getDefaultFontData(store, prefKey);
|
|
||||||
}
|
|
||||||
if (data != null) {
|
|
||||||
Font font= new Font(styledText.getDisplay(), data);
|
|
||||||
styledText.setFont(font);
|
|
||||||
|
|
||||||
if (fFont != null)
|
|
||||||
fFont.dispose();
|
|
||||||
|
|
||||||
fFont= font;
|
|
||||||
} else {
|
|
||||||
// if all the preferences failed
|
|
||||||
styledText.setFont(JFaceResources.getTextFont());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IWorkbenchPart#setFocus()
|
|
||||||
*/
|
|
||||||
public void setFocus() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the context menu
|
|
||||||
*/
|
|
||||||
protected void initializeContextMenu(Control parent) {
|
|
||||||
MenuManager menuMgr= new MenuManager("#PopupMenu");
|
|
||||||
menuMgr.setRemoveAllWhenShown(true);
|
|
||||||
menuMgr.addMenuListener(new IMenuListener() {
|
|
||||||
public void menuAboutToShow(IMenuManager manager) {
|
|
||||||
fillContextMenu(manager);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Menu menu= menuMgr.createContextMenu(parent);
|
|
||||||
parent.setMenu(menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the text manipulation actions to the <code>ConsoleViewer</code>
|
|
||||||
*/
|
|
||||||
protected void fillContextMenu(IMenuManager menu) {
|
|
||||||
fCopyAction.update();
|
|
||||||
menu.add(fCopyAction);
|
|
||||||
menu.add(fSelectAllAction);
|
|
||||||
menu.add(new Separator());
|
|
||||||
menu.add(fClearOutputAction);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configures the toolBar.
|
|
||||||
*/
|
|
||||||
private void initializeToolBar() {
|
|
||||||
IActionBars actionBars= getViewSite().getActionBars();
|
|
||||||
actionBars.getToolBarManager().add(fClearOutputAction);
|
|
||||||
actionBars.updateActionBars();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the console
|
|
||||||
*/
|
|
||||||
void clear() {
|
|
||||||
//fTextViewer.getDocument().set("");
|
|
||||||
CPlugin.getDefault().getConsole().clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reveals (makes visible) the end of the current document
|
|
||||||
*/
|
|
||||||
protected void revealEndOfDocument() {
|
|
||||||
IDocument doc= fTextViewer.getDocument();
|
|
||||||
int docLength= doc.getLength();
|
|
||||||
if (docLength > 0) {
|
|
||||||
fTextViewer.revealRange(docLength - 1, 1);
|
|
||||||
StyledText widget= fTextViewer.getTextWidget();
|
|
||||||
widget.setCaretOffset(docLength);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @see WorkbenchPart#dispose()
|
|
||||||
*/
|
|
||||||
public void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
if (fPropertyChangeListener != null) {
|
|
||||||
IPreferenceStore store= CPlugin.getDefault().getPreferenceStore();
|
|
||||||
store.removePropertyChangeListener(fPropertyChangeListener);
|
|
||||||
fPropertyChangeListener= null;
|
|
||||||
}
|
|
||||||
if (fFont != null) {
|
|
||||||
fFont.dispose();
|
|
||||||
fFont= null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,6 +6,7 @@ package org.eclipse.cdt.internal.ui;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.cdt.ui.ICCompletionContributor;
|
import org.eclipse.cdt.ui.ICCompletionContributor;
|
||||||
import org.eclipse.cdt.ui.IFunctionSummary;
|
import org.eclipse.cdt.ui.IFunctionSummary;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -87,7 +88,7 @@ public class CCompletionContributorManager {
|
||||||
fCompletionContributors= new ArrayList(2);
|
fCompletionContributors= new ArrayList(2);
|
||||||
|
|
||||||
// populate list
|
// populate list
|
||||||
IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(CPlugin.PLUGIN_ID, "CCompletionContributor"); //$NON-NLS-1$
|
IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(CUIPlugin.PLUGIN_ID, "CCompletionContributor"); //$NON-NLS-1$
|
||||||
if (extensionPoint != null) {
|
if (extensionPoint != null) {
|
||||||
IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
|
IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
|
||||||
for (int i= 0; i < elements.length; i++) {
|
for (int i= 0; i < elements.length; i++) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.cdt.core.model.IBinary;
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.core.model.ICRoot;
|
import org.eclipse.cdt.core.model.ICRoot;
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
public class CContentProvider extends BaseCElementContentProvider implements ITreeContentProvider, IElementChangedListener {
|
public class CContentProvider extends BaseCElementContentProvider implements ITreeContentProvider, IElementChangedListener {
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ public class CContentProvider extends BaseCElementContentProvider implements ITr
|
||||||
try {
|
try {
|
||||||
processDelta(event.getDelta());
|
processDelta(event.getDelta());
|
||||||
} catch(CModelException e) {
|
} catch(CModelException e) {
|
||||||
CPlugin.getDefault().log(e);
|
CUIPlugin.getDefault().log(e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.model.ICFile;
|
import org.eclipse.cdt.core.model.ICFile;
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry;
|
import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ public class CElementImageProvider {
|
||||||
private static ImageDescriptor DESC_OBJ_PROJECT;
|
private static ImageDescriptor DESC_OBJ_PROJECT;
|
||||||
private static ImageDescriptor DESC_OBJ_FOLDER;
|
private static ImageDescriptor DESC_OBJ_FOLDER;
|
||||||
{
|
{
|
||||||
ISharedImages images= CPlugin.getDefault().getWorkbench().getSharedImages();
|
ISharedImages images= CUIPlugin.getDefault().getWorkbench().getSharedImages();
|
||||||
DESC_OBJ_PROJECT_CLOSED= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT_CLOSED);
|
DESC_OBJ_PROJECT_CLOSED= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT_CLOSED);
|
||||||
DESC_OBJ_PROJECT= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT);
|
DESC_OBJ_PROJECT= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT);
|
||||||
DESC_OBJ_FOLDER= images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
|
DESC_OBJ_FOLDER= images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
|
||||||
|
@ -79,7 +80,7 @@ public class CElementImageProvider {
|
||||||
private ImageDescriptorRegistry fRegistry;
|
private ImageDescriptorRegistry fRegistry;
|
||||||
|
|
||||||
public CElementImageProvider() {
|
public CElementImageProvider() {
|
||||||
fRegistry= CPlugin.getImageDescriptorRegistry();
|
fRegistry= CUIPlugin.getImageDescriptorRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.model.ICFile;
|
import org.eclipse.cdt.core.model.ICFile;
|
||||||
import org.eclipse.cdt.core.model.IBinary;
|
import org.eclipse.cdt.core.model.IBinary;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The label provider for the c model elements.
|
* The label provider for the c model elements.
|
||||||
|
@ -40,7 +41,7 @@ public class CElementLabelProvider extends LabelProvider {
|
||||||
* @param imageFlags Flags defined in <code>JavaElementImageProvider</code>.
|
* @param imageFlags Flags defined in <code>JavaElementImageProvider</code>.
|
||||||
*/
|
*/
|
||||||
public CElementLabelProvider(int textFlags, int imageFlags, IAdornmentProvider[] adormentProviders) {
|
public CElementLabelProvider(int textFlags, int imageFlags, IAdornmentProvider[] adormentProviders) {
|
||||||
fImageRegistry= CPlugin.getDefault().getImageRegistry();
|
fImageRegistry= CUIPlugin.getDefault().getImageRegistry();
|
||||||
fWorkbenchLabelProvider= new WorkbenchLabelProvider();
|
fWorkbenchLabelProvider= new WorkbenchLabelProvider();
|
||||||
|
|
||||||
fImageLabelProvider= new CElementImageProvider();
|
fImageLabelProvider= new CElementImageProvider();
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.eclipse.ui.views.properties.IPropertySource;
|
||||||
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
public class CElementProperties implements IPropertySource {
|
public class CElementProperties implements IPropertySource {
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ public class CElementProperties implements IPropertySource {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// resource name
|
// resource name
|
||||||
String displayName= CPlugin.getResourceString(LABEL);
|
String displayName= CUIPlugin.getResourceString(LABEL);
|
||||||
PropertyDescriptor descriptor= new PropertyDescriptor(IBasicPropertyConstants.P_TEXT, displayName);
|
PropertyDescriptor descriptor= new PropertyDescriptor(IBasicPropertyConstants.P_TEXT, displayName);
|
||||||
descriptor.setAlwaysIncompatible(true);
|
descriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.eclipse.ui.views.properties.IPropertySource;
|
||||||
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
public class CElementPropertySource implements IPropertySource {
|
public class CElementPropertySource implements IPropertySource {
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ public class CElementPropertySource implements IPropertySource {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// resource name
|
// resource name
|
||||||
String displayName= CPlugin.getResourceString(LABEL);
|
String displayName= CUIPlugin.getResourceString(LABEL);
|
||||||
PropertyDescriptor descriptor= new PropertyDescriptor(IBasicPropertyConstants.P_TEXT, displayName);
|
PropertyDescriptor descriptor= new PropertyDescriptor(IBasicPropertyConstants.P_TEXT, displayName);
|
||||||
descriptor.setAlwaysIncompatible(true);
|
descriptor.setAlwaysIncompatible(true);
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.eclipse.cdt.internal.ui;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.search.ui.SearchUI;
|
import org.eclipse.search.ui.SearchUI;
|
||||||
import org.eclipse.ui.IFolderLayout;
|
import org.eclipse.ui.IFolderLayout;
|
||||||
import org.eclipse.ui.IPageLayout;
|
import org.eclipse.ui.IPageLayout;
|
||||||
|
@ -26,24 +27,24 @@ public class CPerspectiveFactory implements IPerspectiveFactory {
|
||||||
String editorArea = layout.getEditorArea();
|
String editorArea = layout.getEditorArea();
|
||||||
|
|
||||||
IFolderLayout folder1= layout.createFolder("topLeft", IPageLayout.LEFT, (float)0.25, editorArea);
|
IFolderLayout folder1= layout.createFolder("topLeft", IPageLayout.LEFT, (float)0.25, editorArea);
|
||||||
folder1.addView(CPlugin.CVIEW_ID);
|
folder1.addView(CUIPlugin.CVIEW_ID);
|
||||||
folder1.addView(IPageLayout.ID_RES_NAV);
|
folder1.addView(IPageLayout.ID_RES_NAV);
|
||||||
folder1.addPlaceholder(IPageLayout.ID_BOOKMARKS);
|
folder1.addPlaceholder(IPageLayout.ID_BOOKMARKS);
|
||||||
|
|
||||||
IFolderLayout folder2= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea);
|
IFolderLayout folder2= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea);
|
||||||
folder2.addView(IPageLayout.ID_TASK_LIST);
|
folder2.addView(IPageLayout.ID_TASK_LIST);
|
||||||
folder2.addView(CPlugin.CONSOLE_ID);
|
folder2.addView(CUIPlugin.CONSOLE_ID);
|
||||||
folder2.addView(IPageLayout.ID_PROP_SHEET);
|
folder2.addView(IPageLayout.ID_PROP_SHEET);
|
||||||
|
|
||||||
IFolderLayout folder3= layout.createFolder("topRight", IPageLayout.RIGHT,(float)0.75, editorArea);
|
IFolderLayout folder3= layout.createFolder("topRight", IPageLayout.RIGHT,(float)0.75, editorArea);
|
||||||
folder3.addView(IPageLayout.ID_OUTLINE);
|
folder3.addView(IPageLayout.ID_OUTLINE);
|
||||||
folder3.addView(CPlugin.MAKEVIEW_ID);
|
folder3.addView(CUIPlugin.MAKEVIEW_ID);
|
||||||
|
|
||||||
// layout.addActionSet(CPlugin.WIZARD_ACTION_SET_ID);
|
// layout.addActionSet(CUIPlugin.WIZARD_ACTION_SET_ID);
|
||||||
layout.addActionSet(CPlugin.FOLDER_ACTION_SET_ID);
|
layout.addActionSet(CUIPlugin.FOLDER_ACTION_SET_ID);
|
||||||
|
|
||||||
// views - build console
|
// views - build console
|
||||||
layout.addShowViewShortcut(CPlugin.CONSOLE_ID);
|
layout.addShowViewShortcut(CUIPlugin.CONSOLE_ID);
|
||||||
|
|
||||||
// views - searching
|
// views - searching
|
||||||
layout.addShowViewShortcut(SearchUI.SEARCH_RESULT_VIEW_ID);
|
layout.addShowViewShortcut(SearchUI.SEARCH_RESULT_VIEW_ID);
|
||||||
|
@ -51,12 +52,12 @@ public class CPerspectiveFactory implements IPerspectiveFactory {
|
||||||
// views - standard workbench
|
// views - standard workbench
|
||||||
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
|
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
|
||||||
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
|
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
|
||||||
layout.addShowViewShortcut(CPlugin.CVIEW_ID);
|
layout.addShowViewShortcut(CUIPlugin.CVIEW_ID);
|
||||||
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
|
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
|
||||||
layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
|
layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
|
||||||
|
|
||||||
// new actions - C project creation wizard
|
// new actions - C project creation wizard
|
||||||
layout.addNewWizardShortcut(CPlugin.FILE_WIZARD_ID);
|
layout.addNewWizardShortcut(CUIPlugin.FILE_WIZARD_ID);
|
||||||
layout.addNewWizardShortcut(CPlugin.FOLDER_WIZARD_ID);
|
layout.addNewWizardShortcut(CUIPlugin.FOLDER_WIZARD_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ package org.eclipse.cdt.internal.ui;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.resource.ImageRegistry;
|
import org.eclipse.jface.resource.ImageRegistry;
|
||||||
|
@ -24,12 +26,12 @@ public class CPluginImages {
|
||||||
private static URL fgIconBaseURL;
|
private static URL fgIconBaseURL;
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
fgIconBaseURL= new URL(CPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" );
|
fgIconBaseURL= new URL(CUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" );
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static final String NAME_PREFIX= CPlugin.PLUGIN_ID + '.';
|
private static final String NAME_PREFIX= CUIPlugin.PLUGIN_ID + '.';
|
||||||
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
|
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
|
||||||
private static final String T= "full/";
|
private static final String T= "full/";
|
||||||
|
|
||||||
|
@ -151,7 +153,7 @@ public class CPluginImages {
|
||||||
try {
|
try {
|
||||||
return new URL(fgIconBaseURL, buffer.toString());
|
return new URL(fgIconBaseURL, buffer.toString());
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.eclipse.cdt.internal.ui;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
public class CUIStatus extends Status {
|
public class CUIStatus extends Status {
|
||||||
|
|
||||||
public CUIStatus(int code, String message, Throwable throwable) {
|
public CUIStatus(int code, String message, Throwable throwable) {
|
||||||
super(IStatus.ERROR, CPlugin.getPluginId(), code, message, throwable);
|
super(IStatus.ERROR, CUIPlugin.getPluginId(), code, message, throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software System Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/package org.eclipse.cdt.internal.ui;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleEvent;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
|
||||||
|
public class ConsoleEvent implements IBuildConsoleEvent {
|
||||||
|
private IProject fProject;
|
||||||
|
private int fType;
|
||||||
|
|
||||||
|
public ConsoleEvent(IProject project, int type) {
|
||||||
|
fProject = project;
|
||||||
|
fType = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IProject getProject() {
|
||||||
|
return fProject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return fType;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import org.eclipse.cdt.core.model.ICResource;
|
||||||
import org.eclipse.cdt.core.model.ISourceRange;
|
import org.eclipse.cdt.core.model.ISourceRange;
|
||||||
import org.eclipse.cdt.core.model.ISourceReference;
|
import org.eclipse.cdt.core.model.ISourceReference;
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -62,7 +63,7 @@ public class ErrorTickAdornmentProvider implements IAdornmentProvider {
|
||||||
return getErrorTicksFromMarkers((IResource) obj, IResource.DEPTH_INFINITE, null);
|
return getErrorTicksFromMarkers((IResource) obj, IResource.DEPTH_INFINITE, null);
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.eclipse.cdt.internal.ui;
|
package org.eclipse.cdt.internal.ui;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
* (c) Copyright IBM Corp. 2000, 2001.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
|
@ -14,7 +16,7 @@ package org.eclipse.cdt.internal.ui;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ICHelpContextIds {
|
public interface ICHelpContextIds {
|
||||||
public static final String PREFIX= CPlugin.PLUGIN_ID + ".";
|
public static final String PREFIX= CUIPlugin.PLUGIN_ID + ".";
|
||||||
|
|
||||||
// Wizard pages
|
// Wizard pages
|
||||||
public static final String NEW_CPROJECT_WIZARD_PAGE= PREFIX + "new_cproject_wizard_page_context";
|
public static final String NEW_CPROJECT_WIZARD_PAGE= PREFIX + "new_cproject_wizard_page_context";
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ResourceAdapterFactory implements IAdapterFactory {
|
||||||
return celementFactory.create((IResource)element);
|
return celementFactory.create((IResource)element);
|
||||||
}
|
}
|
||||||
//} catch (CoreException e) {
|
//} catch (CoreException e) {
|
||||||
// CPlugin.getDefault().getLog().log(e.getStatus());
|
// CUIPlugin.getDefault().getLog().log(e.getStatus());
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.eclipse.cdt.internal.ui;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.*;
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ public class StandardCElementLabelProvider extends CElementLabelProvider impleme
|
||||||
public StandardCElementLabelProvider(int textFlags, int imageFlags, IAdornmentProvider[] adormentProviders) {
|
public StandardCElementLabelProvider(int textFlags, int imageFlags, IAdornmentProvider[] adormentProviders) {
|
||||||
super(textFlags, imageFlags, adormentProviders);
|
super(textFlags, imageFlags, adormentProviders);
|
||||||
initMasks();
|
initMasks();
|
||||||
CPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
|
CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,7 +70,7 @@ public class StandardCElementLabelProvider extends CElementLabelProvider impleme
|
||||||
* @see IBaseLabelProvider#dispose()
|
* @see IBaseLabelProvider#dispose()
|
||||||
*/
|
*/
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
CPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
|
CUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.internal.ui;
|
package org.eclipse.cdt.internal.ui.buildconsole;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
* (c) Copyright IBM Corp. 2000, 2001.
|
|
@ -0,0 +1,298 @@
|
||||||
|
package org.eclipse.cdt.internal.ui.buildconsole;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (c) Copyright IBM Corp. 2000, 2001.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
|
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleEvent;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleListener;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleManager;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
import org.eclipse.jface.action.IMenuListener;
|
||||||
|
import org.eclipse.jface.action.IMenuManager;
|
||||||
|
import org.eclipse.jface.action.MenuManager;
|
||||||
|
import org.eclipse.jface.action.Separator;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
|
import org.eclipse.jface.resource.JFaceResources;
|
||||||
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
import org.eclipse.jface.text.ITextListener;
|
||||||
|
import org.eclipse.jface.text.TextEvent;
|
||||||
|
import org.eclipse.jface.text.TextViewer;
|
||||||
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
|
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.swt.SWT;
|
||||||
|
import org.eclipse.swt.custom.StyledText;
|
||||||
|
import org.eclipse.swt.graphics.Font;
|
||||||
|
import org.eclipse.swt.graphics.FontData;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
import org.eclipse.swt.widgets.Menu;
|
||||||
|
import org.eclipse.ui.IActionBars;
|
||||||
|
import org.eclipse.ui.ISelectionListener;
|
||||||
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
import org.eclipse.ui.help.WorkbenchHelp;
|
||||||
|
import org.eclipse.ui.part.ViewPart;
|
||||||
|
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
|
||||||
|
import org.eclipse.ui.texteditor.TextEditorAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Console view for the desktop. Registered using XML.
|
||||||
|
*/
|
||||||
|
public class BuildConsoleView extends ViewPart implements ISelectionListener, IBuildConsoleListener {
|
||||||
|
private IProject selProject;
|
||||||
|
private Font fFont;
|
||||||
|
private IPropertyChangeListener fPropertyChangeListener;
|
||||||
|
protected TextViewer fTextViewer;
|
||||||
|
IBuildConsoleManager fConsoleManager;
|
||||||
|
ClearConsoleAction fClearOutputAction;
|
||||||
|
TextEditorAction fCopyAction;
|
||||||
|
TextEditorAction fSelectAllAction;
|
||||||
|
String origTitle;
|
||||||
|
|
||||||
|
public BuildConsoleView() {
|
||||||
|
super();
|
||||||
|
fFont = null;
|
||||||
|
fPropertyChangeListener = new IPropertyChangeListener() {
|
||||||
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
|
if (fTextViewer != null && event.getProperty().equals(CPluginPreferencePage.PREF_CONSOLE_FONT)) {
|
||||||
|
initializeWidgetFont(fTextViewer.getTextWidget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
store.addPropertyChangeListener(fPropertyChangeListener);
|
||||||
|
fConsoleManager = CUIPlugin.getDefault().getConsoleManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeActions() {
|
||||||
|
ResourceBundle bundle = CUIPlugin.getResourceBundle();
|
||||||
|
|
||||||
|
IActionBars actionBars = getViewSite().getActionBars();
|
||||||
|
fClearOutputAction = new ClearConsoleAction(this);
|
||||||
|
fCopyAction = new BuildConsoleAction(bundle, "Editor.Copy.", fTextViewer, fTextViewer.COPY);
|
||||||
|
fSelectAllAction = new BuildConsoleAction(bundle, "Editor.SelectAll.", fTextViewer, fTextViewer.SELECT_ALL);
|
||||||
|
|
||||||
|
actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, fCopyAction);
|
||||||
|
actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction);
|
||||||
|
|
||||||
|
fTextViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
||||||
|
public void selectionChanged(SelectionChangedEvent e) {
|
||||||
|
// ensures that the copyAction updates is doability when the selections tate changes
|
||||||
|
fCopyAction.update();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ViewPart#createPartControl
|
||||||
|
*/
|
||||||
|
public void createPartControl(Composite parent) {
|
||||||
|
fTextViewer = new TextViewer(parent, SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP | SWT.MULTI);
|
||||||
|
fTextViewer.addTextListener(new ITextListener() {
|
||||||
|
public void textChanged(TextEvent event) {
|
||||||
|
revealEndOfDocument();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
fTextViewer.setEditable(false);
|
||||||
|
initializeWidgetFont(fTextViewer.getTextWidget());
|
||||||
|
|
||||||
|
initializeActions();
|
||||||
|
initializeContextMenu(fTextViewer.getControl());
|
||||||
|
initializeToolBar();
|
||||||
|
|
||||||
|
WorkbenchHelp.setHelp(fTextViewer.getControl(), ICHelpContextIds.CLEAR_CONSOLE_VIEW);
|
||||||
|
|
||||||
|
fTextViewer.setDocument(getDocument(getSite().getPage().getSelection()));
|
||||||
|
origTitle = getTitle();
|
||||||
|
setTitle(getSite().getPage().getSelection());
|
||||||
|
getSite().getPage().addSelectionListener(this);
|
||||||
|
fConsoleManager.addConsoleListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IProject getProject(ISelection selection) {
|
||||||
|
if ( selection == null ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
IStructuredSelection ssel = (IStructuredSelection) selection;
|
||||||
|
IAdaptable input = (IAdaptable) ssel.getFirstElement();
|
||||||
|
if (input != null) {
|
||||||
|
IResource resource = null;
|
||||||
|
if (input instanceof IResource) {
|
||||||
|
resource = (IResource) input;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
resource = (IResource) input.getAdapter(IResource.class);
|
||||||
|
}
|
||||||
|
if (resource != null) {
|
||||||
|
return resource.getProject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ClassCastException e) {
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IDocument getDocument(ISelection selection) {
|
||||||
|
IProject project = getProject(selection);
|
||||||
|
if (project != null ) {
|
||||||
|
return fConsoleManager.getConsoleDocument(project);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setTitle(ISelection selection) {
|
||||||
|
String title = origTitle;
|
||||||
|
IProject project = getProject(selection);
|
||||||
|
if (project != null ) {
|
||||||
|
title += " [" + project.getName() + "]";
|
||||||
|
}
|
||||||
|
setTitle(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initializeWidgetFont(StyledText styledText) {
|
||||||
|
IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
String prefKey = CPluginPreferencePage.PREF_CONSOLE_FONT;
|
||||||
|
FontData data = null;
|
||||||
|
if (store.contains(prefKey) && !store.isDefault(prefKey)) {
|
||||||
|
data = PreferenceConverter.getFontData(store, prefKey);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data = PreferenceConverter.getDefaultFontData(store, prefKey);
|
||||||
|
}
|
||||||
|
if (data != null) {
|
||||||
|
Font font = new Font(styledText.getDisplay(), data);
|
||||||
|
styledText.setFont(font);
|
||||||
|
|
||||||
|
if (fFont != null)
|
||||||
|
fFont.dispose();
|
||||||
|
|
||||||
|
fFont = font;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// if all the preferences failed
|
||||||
|
styledText.setFont(JFaceResources.getTextFont());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see IWorkbenchPart#setFocus()
|
||||||
|
*/
|
||||||
|
public void setFocus() {
|
||||||
|
fTextViewer.getControl().setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the context menu
|
||||||
|
*/
|
||||||
|
protected void initializeContextMenu(Control parent) {
|
||||||
|
MenuManager menuMgr = new MenuManager("#PopupMenu");
|
||||||
|
menuMgr.setRemoveAllWhenShown(true);
|
||||||
|
menuMgr.addMenuListener(new IMenuListener() {
|
||||||
|
public void menuAboutToShow(IMenuManager manager) {
|
||||||
|
fillContextMenu(manager);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Menu menu = menuMgr.createContextMenu(parent);
|
||||||
|
parent.setMenu(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the text manipulation actions to the <code>ConsoleViewer</code>
|
||||||
|
*/
|
||||||
|
protected void fillContextMenu(IMenuManager menu) {
|
||||||
|
fCopyAction.update();
|
||||||
|
menu.add(fCopyAction);
|
||||||
|
menu.add(fSelectAllAction);
|
||||||
|
menu.add(new Separator());
|
||||||
|
menu.add(fClearOutputAction);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures the toolBar.
|
||||||
|
*/
|
||||||
|
private void initializeToolBar() {
|
||||||
|
IActionBars actionBars = getViewSite().getActionBars();
|
||||||
|
actionBars.getToolBarManager().add(fClearOutputAction);
|
||||||
|
actionBars.updateActionBars();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the console
|
||||||
|
*/
|
||||||
|
void clear() {
|
||||||
|
if (selProject != null) {
|
||||||
|
fConsoleManager.getConsole(selProject).clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reveals (makes visible) the end of the current document
|
||||||
|
*/
|
||||||
|
protected void revealEndOfDocument() {
|
||||||
|
IDocument doc = fTextViewer.getDocument();
|
||||||
|
int docLength = doc.getLength();
|
||||||
|
if (docLength > 0) {
|
||||||
|
fTextViewer.revealRange(docLength - 1, 1);
|
||||||
|
StyledText widget = fTextViewer.getTextWidget();
|
||||||
|
widget.setCaretOffset(docLength);
|
||||||
|
widget.showSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see WorkbenchPart#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
if (fPropertyChangeListener != null) {
|
||||||
|
IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
store.removePropertyChangeListener(fPropertyChangeListener);
|
||||||
|
fPropertyChangeListener = null;
|
||||||
|
}
|
||||||
|
if (fFont != null) {
|
||||||
|
fFont.dispose();
|
||||||
|
fFont = null;
|
||||||
|
}
|
||||||
|
getSite().getPage().removeSelectionListener(this);
|
||||||
|
fConsoleManager.removeConsoleListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
|
||||||
|
fTextViewer.setDocument(getDocument(selection));
|
||||||
|
setTitle(selection);
|
||||||
|
}
|
||||||
|
public void consoleChange(IBuildConsoleEvent event) {
|
||||||
|
if ( event.getType() == IBuildConsoleEvent.CONSOLE_START ) {
|
||||||
|
Display display = fTextViewer.getControl().getDisplay();
|
||||||
|
final IProject project = event.getProject();
|
||||||
|
display.asyncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
String title = origTitle;
|
||||||
|
if (project != null ) {
|
||||||
|
title += " [" + project.getName() + "]";
|
||||||
|
}
|
||||||
|
setTitle(title);
|
||||||
|
fTextViewer.setDocument(fConsoleManager.getConsoleDocument(project));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +1,13 @@
|
||||||
package org.eclipse.cdt.internal.ui;
|
package org.eclipse.cdt.internal.ui.buildconsole;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
* (c) Copyright IBM Corp. 2000, 2001.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.action.Action;
|
import org.eclipse.jface.action.Action;
|
||||||
|
|
||||||
import org.eclipse.ui.help.WorkbenchHelp;
|
import org.eclipse.ui.help.WorkbenchHelp;
|
||||||
|
@ -20,10 +23,10 @@ public class ClearConsoleAction extends Action {
|
||||||
|
|
||||||
|
|
||||||
public ClearConsoleAction(BuildConsoleView view) {
|
public ClearConsoleAction(BuildConsoleView view) {
|
||||||
super(CPlugin.getResourceString("ClearOutputAction.label"));
|
super(CUIPlugin.getResourceString("ClearOutputAction.label"));
|
||||||
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_CLEAR_CONSOLE);
|
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_CLEAR_CONSOLE);
|
||||||
fConsoleView= view;
|
fConsoleView= view;
|
||||||
setToolTipText(CPlugin.getResourceString("ClearOutputAction.tooltip"));
|
setToolTipText(CUIPlugin.getResourceString("ClearOutputAction.tooltip"));
|
||||||
WorkbenchHelp.setHelp(this, ICHelpContextIds.CLEAR_CONSOLE_ACTION);
|
WorkbenchHelp.setHelp(this, ICHelpContextIds.CLEAR_CONSOLE_ACTION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,9 @@ package org.eclipse.cdt.internal.ui.compare;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -32,7 +32,7 @@ public class CMergeViewer extends TextMergeViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return CPlugin.getResourceString(TITLE);
|
return CUIPlugin.getResourceString(TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,12 +41,12 @@ public class CMergeViewer extends TextMergeViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IDocumentPartitioner getDocumentPartitioner() {
|
protected IDocumentPartitioner getDocumentPartitioner() {
|
||||||
return CPlugin.getDefault().getTextTools().createDocumentPartitioner();
|
return CUIPlugin.getDefault().getTextTools().createDocumentPartitioner();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void configureTextViewer(TextViewer textViewer) {
|
protected void configureTextViewer(TextViewer textViewer) {
|
||||||
if (textViewer instanceof SourceViewer) {
|
if (textViewer instanceof SourceViewer) {
|
||||||
CTextTools tools= CPlugin.getDefault().getTextTools();
|
CTextTools tools= CUIPlugin.getDefault().getTextTools();
|
||||||
((SourceViewer)textViewer).configure(new CSourceViewerConfiguration(tools, null));
|
((SourceViewer)textViewer).configure(new CSourceViewerConfiguration(tools, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.core.DocumentInputStream;
|
import org.eclipse.cdt.internal.core.DocumentInputStream;
|
||||||
import org.eclipse.cdt.internal.parser.CStructurizer;
|
import org.eclipse.cdt.internal.parser.CStructurizer;
|
||||||
import org.eclipse.cdt.internal.parser.IStructurizerCallback;
|
import org.eclipse.cdt.internal.parser.IStructurizerCallback;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ public class CStructureCreator implements IStructureCreator {
|
||||||
* @see IStructureCreator#getTitle
|
* @see IStructureCreator#getTitle
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return CPlugin.getResourceString(NAME);
|
return CUIPlugin.getResourceString(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,8 +13,8 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.util.StringMatcher;
|
import org.eclipse.cdt.internal.ui.util.StringMatcher;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FiltersContent provides the elements for use by the list dialog
|
* The FiltersContent provides the elements for use by the list dialog
|
||||||
|
@ -45,7 +45,7 @@ public class CElementFilters {
|
||||||
public static List getDefinedFilters() {
|
public static List getDefinedFilters() {
|
||||||
if (definedFilters == null) {
|
if (definedFilters == null) {
|
||||||
// Overide the default by the user preference
|
// Overide the default by the user preference
|
||||||
CPlugin plugin = CPlugin.getDefault();
|
CUIPlugin plugin = CUIPlugin.getDefault();
|
||||||
String storedPatterns= plugin.getPluginPreferences().getString(FILTERS_TAG);
|
String storedPatterns= plugin.getPluginPreferences().getString(FILTERS_TAG);
|
||||||
|
|
||||||
if (storedPatterns.length() > 0) {
|
if (storedPatterns.length() > 0) {
|
||||||
|
@ -110,7 +110,7 @@ public class CElementFilters {
|
||||||
static void readFilters() {
|
static void readFilters() {
|
||||||
definedFilters = new ArrayList();
|
definedFilters = new ArrayList();
|
||||||
defaultFilters = new ArrayList();
|
defaultFilters = new ArrayList();
|
||||||
CPlugin plugin = CPlugin.getDefault();
|
CUIPlugin plugin = CUIPlugin.getDefault();
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(FILTERS_TAG);
|
IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(FILTERS_TAG);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.util.StringMatcher;
|
import org.eclipse.cdt.internal.ui.util.StringMatcher;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICFolder;
|
import org.eclipse.cdt.core.model.ICFolder;
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
|
@ -28,7 +28,7 @@ public class CPatternFilter extends ViewerFilter {
|
||||||
static String FILTERS_TAG= "CElementFilters"; //$NON-NLS-1$
|
static String FILTERS_TAG= "CElementFilters"; //$NON-NLS-1$
|
||||||
|
|
||||||
private void initializeFromPreferences() {
|
private void initializeFromPreferences() {
|
||||||
CPlugin plugin= CPlugin.getDefault();
|
CUIPlugin plugin= CUIPlugin.getDefault();
|
||||||
String storedPatterns= plugin.getPreferenceStore().getString(FILTERS_TAG);
|
String storedPatterns= plugin.getPreferenceStore().getString(FILTERS_TAG);
|
||||||
|
|
||||||
if (storedPatterns.length() == 0) {
|
if (storedPatterns.length() == 0) {
|
||||||
|
|
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.core.model.ICRoot;
|
||||||
import org.eclipse.cdt.core.model.IParent;
|
import org.eclipse.cdt.core.model.IParent;
|
||||||
import org.eclipse.cdt.core.resources.MakeUtil;
|
import org.eclipse.cdt.core.resources.MakeUtil;
|
||||||
import org.eclipse.cdt.internal.ui.CContentProvider;
|
import org.eclipse.cdt.internal.ui.CContentProvider;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
import org.eclipse.cdt.internal.ui.editor.OpenIncludeAction;
|
import org.eclipse.cdt.internal.ui.editor.OpenIncludeAction;
|
||||||
|
@ -29,6 +28,7 @@ import org.eclipse.cdt.internal.ui.makeview.MakeTargetAction;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IFolder;
|
import org.eclipse.core.resources.IFolder;
|
||||||
|
@ -329,7 +329,7 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
}
|
}
|
||||||
|
|
||||||
void initFilterFromPreferences() {
|
void initFilterFromPreferences() {
|
||||||
CPlugin plugin = CPlugin.getDefault();
|
CUIPlugin plugin = CUIPlugin.getDefault();
|
||||||
boolean show = plugin.getPreferenceStore().getBoolean(TAG_SHOWLIBRARIES);
|
boolean show = plugin.getPreferenceStore().getBoolean(TAG_SHOWLIBRARIES);
|
||||||
getLibraryFilter().setShowLibraries(show);
|
getLibraryFilter().setShowLibraries(show);
|
||||||
}
|
}
|
||||||
|
@ -375,8 +375,8 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
viewer.setUseHashlookup (true);
|
viewer.setUseHashlookup (true);
|
||||||
viewer.setContentProvider(new CContentProvider (showCUChildren, true));
|
viewer.setContentProvider(new CContentProvider (showCUChildren, true));
|
||||||
viewer.setLabelProvider (new StandardCElementLabelProvider ());
|
viewer.setLabelProvider (new StandardCElementLabelProvider ());
|
||||||
CPlugin.getDefault().getProblemMarkerManager().addListener(viewer);
|
CUIPlugin.getDefault().getProblemMarkerManager().addListener(viewer);
|
||||||
CPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
|
CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
|
||||||
|
|
||||||
// FIXME: Add Drag and Drop support.
|
// FIXME: Add Drag and Drop support.
|
||||||
initFrameList();
|
initFrameList();
|
||||||
|
@ -442,12 +442,12 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
*/
|
*/
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
getSite().getPage().removePartListener(partListener);
|
getSite().getPage().removePartListener(partListener);
|
||||||
CPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
|
CUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
|
||||||
if (viewer != null) {
|
if (viewer != null) {
|
||||||
viewer.removeTreeListener(expansionListener);
|
viewer.removeTreeListener(expansionListener);
|
||||||
CPlugin.getDefault().getProblemMarkerManager().removeListener(viewer);
|
CUIPlugin.getDefault().getProblemMarkerManager().removeListener(viewer);
|
||||||
}
|
}
|
||||||
IWorkspace workspace = CPlugin.getWorkspace();
|
IWorkspace workspace = CUIPlugin.getWorkspace();
|
||||||
workspace.removeResourceChangeListener(closeProjectAction);
|
workspace.removeResourceChangeListener(closeProjectAction);
|
||||||
workspace.removeResourceChangeListener(openProjectAction);
|
workspace.removeResourceChangeListener(openProjectAction);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
@ -515,17 +515,17 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
|
|
||||||
createFileAction = new CreateFileAction(shell);
|
createFileAction = new CreateFileAction(shell);
|
||||||
// overwrite the default name
|
// overwrite the default name
|
||||||
String fileLabel = CPlugin.getDefault().getResourceBundle().getString("CreateFileAction.text");
|
String fileLabel = CUIPlugin.getDefault().getResourceBundle().getString("CreateFileAction.text");
|
||||||
createFileAction.setText(fileLabel);
|
createFileAction.setText(fileLabel);
|
||||||
|
|
||||||
createFolderAction = new CreateFolderAction(shell);
|
createFolderAction = new CreateFolderAction(shell);
|
||||||
// overwrite the default name
|
// overwrite the default name
|
||||||
String folderLabel = CPlugin.getDefault().getResourceBundle().getString("CreateFolderAction.text");
|
String folderLabel = CUIPlugin.getDefault().getResourceBundle().getString("CreateFolderAction.text");
|
||||||
createFolderAction.setText(folderLabel);
|
createFolderAction.setText(folderLabel);
|
||||||
|
|
||||||
|
|
||||||
newWizardAction = new NewWizardAction();
|
newWizardAction = new NewWizardAction();
|
||||||
IWorkspace workspace = CPlugin.getWorkspace();
|
IWorkspace workspace = CUIPlugin.getWorkspace();
|
||||||
|
|
||||||
openProjectAction = new OpenResourceAction(shell);
|
openProjectAction = new OpenResourceAction(shell);
|
||||||
workspace.addResourceChangeListener(openProjectAction, IResourceChangeEvent.POST_CHANGE);
|
workspace.addResourceChangeListener(openProjectAction, IResourceChangeEvent.POST_CHANGE);
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceStatus;
|
import org.eclipse.core.resources.IResourceStatus;
|
||||||
|
@ -413,7 +413,7 @@ class CViewDropAdapter extends PluginDropAdapter implements IOverwriteQuery {
|
||||||
*/
|
*/
|
||||||
public String queryOverwrite(String pathString) {
|
public String queryOverwrite(String pathString) {
|
||||||
final String returnCode[] = {CANCEL};
|
final String returnCode[] = {CANCEL};
|
||||||
final String msg = pathString + " " + CPlugin.getResourceString("CViewDragNDrop.txt") ; //$NON-NLS-1$
|
final String msg = pathString + " " + CUIPlugin.getResourceString("CViewDragNDrop.txt") ; //$NON-NLS-1$
|
||||||
final String[] options = {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
|
final String[] options = {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
|
||||||
getDisplay().syncExec(new Runnable() {
|
getDisplay().syncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.actions.SelectionProviderAction;
|
import org.eclipse.ui.actions.SelectionProviderAction;
|
||||||
import org.eclipse.ui.dialogs.ListSelectionDialog;
|
import org.eclipse.ui.dialogs.ListSelectionDialog;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
//import org.eclipse.cdt.core.model.CElementFilters;
|
//import org.eclipse.cdt.core.model.CElementFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,7 +74,7 @@ class FilterSelectionAction extends SelectionProviderAction {
|
||||||
* They are saved in the format patern,pattern,.
|
* They are saved in the format patern,pattern,.
|
||||||
*/
|
*/
|
||||||
private void saveInPreferences(String[] patterns) {
|
private void saveInPreferences(String[] patterns) {
|
||||||
CPlugin plugin= CPlugin.getDefault();
|
CUIPlugin plugin= CUIPlugin.getDefault();
|
||||||
StringWriter writer= new StringWriter();
|
StringWriter writer= new StringWriter();
|
||||||
|
|
||||||
for (int i = 0; i < patterns.length; i++) {
|
for (int i = 0; i < patterns.length; i++) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FiltersContentProvider provides the elements for use by the list dialog
|
* The FiltersContentProvider provides the elements for use by the list dialog
|
||||||
|
@ -82,7 +82,7 @@ class FiltersContentProvider implements IStructuredContentProvider {
|
||||||
private static void readFilters() {
|
private static void readFilters() {
|
||||||
fgDefinedFilters = new ArrayList();
|
fgDefinedFilters = new ArrayList();
|
||||||
fgDefaultFilters = new ArrayList();
|
fgDefaultFilters = new ArrayList();
|
||||||
CPlugin plugin = CPlugin.getDefault();
|
CUIPlugin plugin = CUIPlugin.getDefault();
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(CPatternFilter.FILTERS_TAG);
|
IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(CPatternFilter.FILTERS_TAG);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ package org.eclipse.cdt.internal.ui.cview;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.actions.SelectionProviderAction;
|
import org.eclipse.ui.actions.SelectionProviderAction;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ShowLibrariesAction is the class that adds the filter views to a PackagesView.
|
* The ShowLibrariesAction is the class that adds the filter views to a PackagesView.
|
||||||
|
@ -53,7 +53,7 @@ class ShowLibrariesAction extends SelectionProviderAction {
|
||||||
* They are saved in the format patern,pattern,.
|
* They are saved in the format patern,pattern,.
|
||||||
*/
|
*/
|
||||||
private void saveInPreferences() {
|
private void saveInPreferences() {
|
||||||
CPlugin plugin = CPlugin.getDefault();
|
CUIPlugin plugin = CUIPlugin.getDefault();
|
||||||
Boolean b = new Boolean (cview.getLibraryFilter().getShowLibraries());
|
Boolean b = new Boolean (cview.getLibraryFilter().getShowLibraries());
|
||||||
|
|
||||||
plugin.getPreferenceStore().putValue(cview.TAG_SHOWLIBRARIES, b.toString());
|
plugin.getPreferenceStore().putValue(cview.TAG_SHOWLIBRARIES, b.toString());
|
||||||
|
|
|
@ -7,8 +7,8 @@ package org.eclipse.cdt.internal.ui.editor;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CCompletionContributorManager;
|
import org.eclipse.cdt.internal.ui.CCompletionContributorManager;
|
||||||
import org.eclipse.cdt.internal.ui.CFileElementWorkingCopy;
|
import org.eclipse.cdt.internal.ui.CFileElementWorkingCopy;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.codemanipulation.AddIncludeOperation;
|
import org.eclipse.cdt.internal.ui.codemanipulation.AddIncludeOperation;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.IFunctionSummary;
|
import org.eclipse.cdt.ui.IFunctionSummary;
|
||||||
import org.eclipse.cdt.ui.IRequiredInclude;
|
import org.eclipse.cdt.ui.IRequiredInclude;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
@ -75,10 +75,10 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate {
|
||||||
else if (editorInput instanceof IStorageEditorInput)
|
else if (editorInput instanceof IStorageEditorInput)
|
||||||
unit = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider);
|
unit = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider);
|
||||||
else
|
else
|
||||||
throw new CoreException(new Status(IStatus.ERROR, CPlugin.PLUGIN_ID, 0, "no Editor Input", null));
|
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "no Editor Input", null));
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return unit;
|
return unit;
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.ui.CFileElementWorkingCopy;
|
import org.eclipse.cdt.internal.ui.CFileElementWorkingCopy;
|
||||||
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
||||||
import org.eclipse.cdt.internal.ui.CContentProvider;
|
import org.eclipse.cdt.internal.ui.CContentProvider;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
public class CContentOutlinePage extends Page implements IContentOutlinePage, ISelectionChangedListener {
|
public class CContentOutlinePage extends Page implements IContentOutlinePage, ISelectionChangedListener {
|
||||||
private CEditor fEditor;
|
private CEditor fEditor;
|
||||||
|
@ -74,7 +74,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
||||||
try {
|
try {
|
||||||
fInput.update();
|
fInput.update();
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
fInput= null;
|
fInput= null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
||||||
treeViewer.setAutoExpandLevel(treeViewer.ALL_LEVELS);
|
treeViewer.setAutoExpandLevel(treeViewer.ALL_LEVELS);
|
||||||
treeViewer.addSelectionChangedListener(this);
|
treeViewer.addSelectionChangedListener(this);
|
||||||
|
|
||||||
CPlugin.getDefault().getProblemMarkerManager().addListener(treeViewer);
|
CUIPlugin.getDefault().getProblemMarkerManager().addListener(treeViewer);
|
||||||
|
|
||||||
MenuManager manager= new MenuManager("#PopUp");
|
MenuManager manager= new MenuManager("#PopUp");
|
||||||
manager.setRemoveAllWhenShown(true);
|
manager.setRemoveAllWhenShown(true);
|
||||||
|
@ -154,23 +154,23 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
||||||
IDocumentProvider provider= fEditor.getDocumentProvider();
|
IDocumentProvider provider= fEditor.getDocumentProvider();
|
||||||
try {
|
try {
|
||||||
if (editorInput instanceof IFileEditorInput)
|
if (editorInput instanceof IFileEditorInput)
|
||||||
//fInput = ((CPlugin.ElementFactory)plugin.getCCore()).createWorkingCopy((IFileEditorInput)editorInput, provider);
|
//fInput = ((CUIPlugin.ElementFactory)plugin.getCCore()).createWorkingCopy((IFileEditorInput)editorInput, provider);
|
||||||
fInput = new CFileElementWorkingCopy((IFileEditorInput)editorInput, provider);
|
fInput = new CFileElementWorkingCopy((IFileEditorInput)editorInput, provider);
|
||||||
else if (editorInput instanceof IStorageEditorInput)
|
else if (editorInput instanceof IStorageEditorInput)
|
||||||
//fInput = ((CPlugin.ElementFactory)plugin.getCCore()).createWorkingCopy((IStorageEditorInput)editorInput, provider);
|
//fInput = ((CUIPlugin.ElementFactory)plugin.getCCore()).createWorkingCopy((IStorageEditorInput)editorInput, provider);
|
||||||
fInput = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider);
|
fInput = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider);
|
||||||
else
|
else
|
||||||
throw new CoreException(new Status(IStatus.ERROR, CPlugin.PLUGIN_ID, 0, "no Editor Input", null));
|
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "no Editor Input", null));
|
||||||
|
|
||||||
treeViewer.setInput(fInput);
|
treeViewer.setInput(fInput);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
fInput= null;
|
fInput= null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
CPlugin.getDefault().getProblemMarkerManager().removeListener(treeViewer);
|
CUIPlugin.getDefault().getProblemMarkerManager().removeListener(treeViewer);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.internal.ui.editor;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IStorage;
|
import org.eclipse.core.resources.IStorage;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.jface.text.AbstractDocument;
|
import org.eclipse.jface.text.AbstractDocument;
|
||||||
|
@ -77,7 +77,7 @@ public class CDocumentProvider extends FileDocumentProvider {
|
||||||
}
|
}
|
||||||
//IDocument document= super.createDocument(element);
|
//IDocument document= super.createDocument(element);
|
||||||
if (document != null) {
|
if (document != null) {
|
||||||
IDocumentPartitioner partitioner= CPlugin.getDefault().getTextTools().createDocumentPartitioner();
|
IDocumentPartitioner partitioner= CUIPlugin.getDefault().getTextTools().createDocumentPartitioner();
|
||||||
partitioner.connect(document);
|
partitioner.connect(document);
|
||||||
document.setDocumentPartitioner(partitioner);
|
document.setDocumentPartitioner(partitioner);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@ import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.ISourceRange;
|
import org.eclipse.cdt.core.model.ISourceRange;
|
||||||
import org.eclipse.cdt.core.model.ISourceReference;
|
import org.eclipse.cdt.core.model.ISourceReference;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||||
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
import org.eclipse.cdt.internal.ui.text.IColorManager;
|
import org.eclipse.cdt.internal.ui.text.IColorManager;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
@ -187,11 +187,11 @@ public class CEditor extends AbstractTextEditor implements ISelectionChangedList
|
||||||
*/
|
*/
|
||||||
public CEditor() {
|
public CEditor() {
|
||||||
super();
|
super();
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
setSourceViewerConfiguration(new CSourceViewerConfiguration(textTools, this));
|
setSourceViewerConfiguration(new CSourceViewerConfiguration(textTools, this));
|
||||||
setDocumentProvider(CPlugin.getDefault().getDocumentProvider());
|
setDocumentProvider(CUIPlugin.getDefault().getDocumentProvider());
|
||||||
setRangeIndicator(new DefaultRangeIndicator());
|
setRangeIndicator(new DefaultRangeIndicator());
|
||||||
setPreferenceStore(CPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
|
|
||||||
setEditorContextMenuId("#CEditorContext"); //$NON-NLS-1$
|
setEditorContextMenuId("#CEditorContext"); //$NON-NLS-1$
|
||||||
setRulerContextMenuId("#CEditorRulerContext"); //$NON-NLS-1$
|
setRulerContextMenuId("#CEditorRulerContext"); //$NON-NLS-1$
|
||||||
|
@ -221,7 +221,7 @@ public class CEditor extends AbstractTextEditor implements ISelectionChangedList
|
||||||
*/
|
*/
|
||||||
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
|
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
|
||||||
//if (!(input instanceof IFileEditorInput)) {
|
//if (!(input instanceof IFileEditorInput)) {
|
||||||
// throw new PartInitException(CPlugin.getResourceString("Editor.error.invalid_input"));
|
// throw new PartInitException(CUIPlugin.getResourceString("Editor.error.invalid_input"));
|
||||||
//}
|
//}
|
||||||
super.init(site, input);
|
super.init(site, input);
|
||||||
}
|
}
|
||||||
|
@ -725,7 +725,7 @@ public class CEditor extends AbstractTextEditor implements ISelectionChangedList
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color getColor(RGB rgb) {
|
private Color getColor(RGB rgb) {
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
return textTools.getColorManager().getColor(rgb);
|
return textTools.getColorManager().getColor(rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1432,7 +1432,7 @@ public class CEditor extends AbstractTextEditor implements ISelectionChangedList
|
||||||
boolean affects=MATCHING_BRACKETS_COLOR.equals(p) ||
|
boolean affects=MATCHING_BRACKETS_COLOR.equals(p) ||
|
||||||
CURRENT_LINE_COLOR.equals(p) ||
|
CURRENT_LINE_COLOR.equals(p) ||
|
||||||
PROBLEM_INDICATION_COLOR.equals(p);
|
PROBLEM_INDICATION_COLOR.equals(p);
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
affects |= textTools.affectsBehavior(event);
|
affects |= textTools.affectsBehavior(event);
|
||||||
|
|
||||||
return affects ? affects : super.affectsTextPresentation(event);
|
return affects ? affects : super.affectsTextPresentation(event);
|
||||||
|
@ -1463,7 +1463,7 @@ public class CEditor extends AbstractTextEditor implements ISelectionChangedList
|
||||||
* @param rulerColumn the ruler column to be initialized
|
* @param rulerColumn the ruler column to be initialized
|
||||||
*/
|
*/
|
||||||
protected void initializeLineNumberRulerColumn(LineNumberRulerColumn rulerColumn) {
|
protected void initializeLineNumberRulerColumn(LineNumberRulerColumn rulerColumn) {
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
IColorManager manager= textTools.getColorManager();
|
IColorManager manager= textTools.getColorManager();
|
||||||
|
|
||||||
IPreferenceStore store= getPreferenceStore();
|
IPreferenceStore store= getPreferenceStore();
|
||||||
|
|
|
@ -7,9 +7,9 @@ package org.eclipse.cdt.internal.ui.editor;
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.action.IMenuManager;
|
import org.eclipse.jface.action.IMenuManager;
|
||||||
import org.eclipse.jface.action.IStatusLineManager;
|
import org.eclipse.jface.action.IStatusLineManager;
|
||||||
import org.eclipse.jface.action.IToolBarManager;
|
import org.eclipse.jface.action.IToolBarManager;
|
||||||
|
@ -36,7 +36,7 @@ public class CEditorActionContributor extends BasicTextEditorActionContributor {
|
||||||
|
|
||||||
|
|
||||||
public SelectionAction(String prefix, int operation) {
|
public SelectionAction(String prefix, int operation) {
|
||||||
super(CPlugin.getDefault().getResourceBundle(), prefix, null);
|
super(CUIPlugin.getDefault().getResourceBundle(), prefix, null);
|
||||||
fOperationCode= operation;
|
fOperationCode= operation;
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.internal.ui.editor;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
import org.eclipse.ui.texteditor.TextEditorAction;
|
import org.eclipse.ui.texteditor.TextEditorAction;
|
||||||
|
@ -18,7 +18,7 @@ public class GotoErrorAction extends TextEditorAction {
|
||||||
|
|
||||||
|
|
||||||
public GotoErrorAction(String prefix, boolean forward) {
|
public GotoErrorAction(String prefix, boolean forward) {
|
||||||
super(CPlugin.getResourceBundle(), prefix, null);
|
super(CUIPlugin.getResourceBundle(), prefix, null);
|
||||||
fForward= forward;
|
fForward= forward;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,8 +11,8 @@ import org.eclipse.jface.viewers.ViewerSorter;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
|
|
||||||
public class LexicalSortingAction extends Action {
|
public class LexicalSortingAction extends Action {
|
||||||
|
@ -24,17 +24,17 @@ public class LexicalSortingAction extends Action {
|
||||||
private TreeViewer fTreeViewer;
|
private TreeViewer fTreeViewer;
|
||||||
|
|
||||||
public LexicalSortingAction(TreeViewer treeViewer) {
|
public LexicalSortingAction(TreeViewer treeViewer) {
|
||||||
super(CPlugin.getResourceString(ACTION_NAME + ".label"));
|
super(CUIPlugin.getResourceString(ACTION_NAME + ".label"));
|
||||||
|
|
||||||
setDescription(CPlugin.getResourceString(ACTION_NAME + ".description"));
|
setDescription(CUIPlugin.getResourceString(ACTION_NAME + ".description"));
|
||||||
setToolTipText(CPlugin.getResourceString(ACTION_NAME + ".tooltip"));
|
setToolTipText(CUIPlugin.getResourceString(ACTION_NAME + ".tooltip"));
|
||||||
|
|
||||||
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_ALPHA_SORTING);
|
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_ALPHA_SORTING);
|
||||||
|
|
||||||
fTreeViewer= treeViewer;
|
fTreeViewer= treeViewer;
|
||||||
fSorter= new LexicalCSorter();
|
fSorter= new LexicalCSorter();
|
||||||
|
|
||||||
boolean checked= CPlugin.getDefault().getDialogSettings().getBoolean(DIALOG_STORE_KEY);
|
boolean checked= CUIPlugin.getDefault().getDialogSettings().getBoolean(DIALOG_STORE_KEY);
|
||||||
valueChanged(checked, false);
|
valueChanged(checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,10 +47,10 @@ public class LexicalSortingAction extends Action {
|
||||||
fTreeViewer.setSorter(on ? fSorter : null);
|
fTreeViewer.setSorter(on ? fSorter : null);
|
||||||
|
|
||||||
String key= ACTION_NAME + ".tooltip" + (on ? ".on" : ".off");
|
String key= ACTION_NAME + ".tooltip" + (on ? ".on" : ".off");
|
||||||
setToolTipText(CPlugin.getResourceString(key));
|
setToolTipText(CUIPlugin.getResourceString(key));
|
||||||
|
|
||||||
if (store) {
|
if (store) {
|
||||||
CPlugin.getDefault().getDialogSettings().put(DIALOG_STORE_KEY, on);
|
CUIPlugin.getDefault().getDialogSettings().put(DIALOG_STORE_KEY, on);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
|
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -51,9 +51,9 @@ public class OpenIncludeAction extends Action {
|
||||||
|
|
||||||
|
|
||||||
public OpenIncludeAction(ISelectionProvider provider) {
|
public OpenIncludeAction(ISelectionProvider provider) {
|
||||||
super(CPlugin.getResourceString(PREFIX + "label"));
|
super(CUIPlugin.getResourceString(PREFIX + "label"));
|
||||||
setDescription(CPlugin.getResourceString(PREFIX + "description"));
|
setDescription(CUIPlugin.getResourceString(PREFIX + "description"));
|
||||||
setToolTipText(CPlugin.getResourceString(PREFIX + "tooltip"));
|
setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip"));
|
||||||
|
|
||||||
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE);
|
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE);
|
||||||
|
|
||||||
|
@ -111,9 +111,9 @@ public class OpenIncludeAction extends Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (CModelException e) {
|
} catch (CModelException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,9 +142,9 @@ public class OpenIncludeAction extends Action {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ElementListSelectionDialog dialog= new ElementListSelectionDialog(CPlugin.getActiveWorkbenchShell(), renderer, false, false);
|
ElementListSelectionDialog dialog= new ElementListSelectionDialog(CUIPlugin.getActiveWorkbenchShell(), renderer, false, false);
|
||||||
dialog.setTitle(CPlugin.getResourceString(DIALOG_TITLE));
|
dialog.setTitle(CUIPlugin.getResourceString(DIALOG_TITLE));
|
||||||
dialog.setMessage(CPlugin.getResourceString(DIALOG_MESSAGE));
|
dialog.setMessage(CUIPlugin.getResourceString(DIALOG_MESSAGE));
|
||||||
dialog.setElements(filesFound);
|
dialog.setElements(filesFound);
|
||||||
|
|
||||||
if (dialog.open() == dialog.OK) {
|
if (dialog.open() == dialog.OK) {
|
||||||
|
|
|
@ -10,10 +10,11 @@ import org.eclipse.cdt.core.index.ITagEntry;
|
||||||
import org.eclipse.cdt.core.index.IndexModel;
|
import org.eclipse.cdt.core.index.IndexModel;
|
||||||
import org.eclipse.cdt.core.index.TagFlags;
|
import org.eclipse.cdt.core.index.TagFlags;
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
|
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -178,11 +179,11 @@ public class OpenOnSelectionAction extends Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (CModelException x) {
|
} catch (CModelException x) {
|
||||||
CPlugin.log(x.getStatus());
|
CUIPlugin.log(x.getStatus());
|
||||||
} catch (PartInitException x) {
|
} catch (PartInitException x) {
|
||||||
CPlugin.log(x);
|
CUIPlugin.log(x);
|
||||||
} catch (CoreException x) {
|
} catch (CoreException x) {
|
||||||
CPlugin.log(x);
|
CUIPlugin.log(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.text.BadLocationException;
|
import org.eclipse.jface.text.BadLocationException;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
import org.eclipse.jface.text.IRegion;
|
import org.eclipse.jface.text.IRegion;
|
||||||
|
@ -313,7 +313,7 @@ public class OverviewRuler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color getColor(RGB rgb) {
|
private Color getColor(RGB rgb) {
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
return textTools.getColorManager().getColor(rgb);
|
return textTools.getColorManager().getColor(rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,9 @@ package org.eclipse.cdt.internal.ui.editor;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.eclipse.jface.action.Action;
|
import org.eclipse.jface.action.Action;
|
||||||
|
@ -42,9 +43,9 @@ public class SearchForReferencesAction extends Action {
|
||||||
|
|
||||||
|
|
||||||
public SearchForReferencesAction(ISelectionProvider provider) {
|
public SearchForReferencesAction(ISelectionProvider provider) {
|
||||||
super(CPlugin.getResourceString(PREFIX + "label"));
|
super(CUIPlugin.getResourceString(PREFIX + "label"));
|
||||||
setDescription(CPlugin.getResourceString(PREFIX + "description"));
|
setDescription(CUIPlugin.getResourceString(PREFIX + "description"));
|
||||||
setToolTipText(CPlugin.getResourceString(PREFIX + "tooltip"));
|
setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip"));
|
||||||
|
|
||||||
if(provider instanceof CContentOutlinePage) {
|
if(provider instanceof CContentOutlinePage) {
|
||||||
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE);
|
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE);
|
||||||
|
@ -90,14 +91,14 @@ public class SearchForReferencesAction extends Action {
|
||||||
scope.addExtension("hh");
|
scope.addExtension("hh");
|
||||||
|
|
||||||
TextSearchOperation op= new TextSearchOperation(
|
TextSearchOperation op= new TextSearchOperation(
|
||||||
CPlugin.getWorkspace(),
|
CUIPlugin.getWorkspace(),
|
||||||
search_name,
|
search_name,
|
||||||
"",
|
"",
|
||||||
scope,
|
scope,
|
||||||
col);
|
col);
|
||||||
|
|
||||||
|
|
||||||
//engine.search(CPlugin.getWorkspace(), element.getName(),
|
//engine.search(CUIPlugin.getWorkspace(), element.getName(),
|
||||||
// null, scope, col);
|
// null, scope, col);
|
||||||
IRunnableContext context= null;
|
IRunnableContext context= null;
|
||||||
//context= getContainer().getRunnableContext();
|
//context= getContainer().getRunnableContext();
|
||||||
|
|
|
@ -8,8 +8,8 @@ package org.eclipse.cdt.internal.ui.editor.asm;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
|
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
|
@ -49,11 +49,11 @@ public class AsmTextEditor extends StatusTextEditor {
|
||||||
* Initializes this editor.
|
* Initializes this editor.
|
||||||
*/
|
*/
|
||||||
protected void initializeEditor() {
|
protected void initializeEditor() {
|
||||||
AsmTextTools textTools= CPlugin.getDefault().getAsmTextTools();
|
AsmTextTools textTools= CUIPlugin.getDefault().getAsmTextTools();
|
||||||
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools, this));
|
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools, this));
|
||||||
setDocumentProvider(CPlugin.getDefault().getDocumentProvider());
|
setDocumentProvider(CUIPlugin.getDefault().getDocumentProvider());
|
||||||
setRangeIndicator(new DefaultRangeIndicator());
|
setRangeIndicator(new DefaultRangeIndicator());
|
||||||
setPreferenceStore(CPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The <code>TextEditor</code> implementation of this
|
* The <code>TextEditor</code> implementation of this
|
||||||
|
@ -131,7 +131,7 @@ public class AsmTextEditor extends StatusTextEditor {
|
||||||
// String p= event.getProperty();
|
// String p= event.getProperty();
|
||||||
|
|
||||||
boolean affects= false;
|
boolean affects= false;
|
||||||
AsmTextTools textTools= CPlugin.getDefault().getAsmTextTools();
|
AsmTextTools textTools= CUIPlugin.getDefault().getAsmTextTools();
|
||||||
affects |= textTools.affectsBehavior(event);
|
affects |= textTools.affectsBehavior(event);
|
||||||
|
|
||||||
return affects ? affects : super.affectsTextPresentation(event);
|
return affects ? affects : super.affectsTextPresentation(event);
|
||||||
|
|
|
@ -5,10 +5,10 @@ package org.eclipse.cdt.internal.ui.editor.asm;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
||||||
import org.eclipse.cdt.internal.ui.text.SingleTokenCScanner;
|
import org.eclipse.cdt.internal.ui.text.SingleTokenCScanner;
|
||||||
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.text.IDocumentPartitioner;
|
import org.eclipse.jface.text.IDocumentPartitioner;
|
||||||
import org.eclipse.jface.text.rules.DefaultPartitioner;
|
import org.eclipse.jface.text.rules.DefaultPartitioner;
|
||||||
|
@ -55,7 +55,7 @@ public class AsmTextTools {
|
||||||
*/
|
*/
|
||||||
public AsmTextTools(IPreferenceStore store) {
|
public AsmTextTools(IPreferenceStore store) {
|
||||||
if(store == null) {
|
if(store == null) {
|
||||||
store = CPlugin.getDefault().getPreferenceStore();
|
store = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
}
|
}
|
||||||
store.addPropertyChangeListener(fPreferenceListener);
|
store.addPropertyChangeListener(fPreferenceListener);
|
||||||
fPreferenceStore = store;
|
fPreferenceStore = store;
|
||||||
|
|
|
@ -90,12 +90,10 @@ public class MakeAction extends Action {
|
||||||
IRunnableWithProgress op = new IRunnableWithProgress () {
|
IRunnableWithProgress op = new IRunnableWithProgress () {
|
||||||
public void run(IProgressMonitor monitor)
|
public void run(IProgressMonitor monitor)
|
||||||
throws InvocationTargetException, InterruptedException {
|
throws InvocationTargetException, InterruptedException {
|
||||||
boolean bCleanConsole = true;
|
|
||||||
for (int i = 0; i < targets.length; ++i ) {
|
for (int i = 0; i < targets.length; ++i ) {
|
||||||
MakeTarget target = targets[i];
|
MakeTarget target = targets[i];
|
||||||
IResource res = target.getResource();
|
IResource res = target.getResource();
|
||||||
IProject project = res.getProject();
|
IProject project = res.getProject();
|
||||||
MakeUtil.setSessionConsoleMode(project, bCleanConsole);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (! project.equals(res) || target.isLeaf()) {
|
if (! project.equals(res) || target.isLeaf()) {
|
||||||
|
@ -113,9 +111,6 @@ public class MakeAction extends Action {
|
||||||
|
|
||||||
MakeUtil.removeSessionBuildDir(project);
|
MakeUtil.removeSessionBuildDir(project);
|
||||||
MakeUtil.removeSessionTarget(project);
|
MakeUtil.removeSessionTarget(project);
|
||||||
// Clean console only before the first target
|
|
||||||
MakeUtil.setSessionConsoleMode(project, true);
|
|
||||||
bCleanConsole = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,7 +47,6 @@ import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
|
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusUtil;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusUtil;
|
||||||
|
@ -56,6 +55,7 @@ import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
import org.eclipse.cdt.internal.ui.text.ContentAssistPreference;
|
import org.eclipse.cdt.internal.ui.text.ContentAssistPreference;
|
||||||
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
|
||||||
|
@ -196,8 +196,8 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
||||||
protected ColorEditor fAppearanceForegroundColorEditor;
|
protected ColorEditor fAppearanceForegroundColorEditor;
|
||||||
|
|
||||||
public CEditorPreferencePage() {
|
public CEditorPreferencePage() {
|
||||||
setDescription(CPlugin.getResourceString("CEditorPreferencePage.description"));
|
setDescription(CUIPlugin.getResourceString("CEditorPreferencePage.description"));
|
||||||
setPreferenceStore(CPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
|
fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -986,7 +986,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
||||||
buffer.append(separator);
|
buffer.append(separator);
|
||||||
}
|
}
|
||||||
} catch (IOException io) {
|
} catch (IOException io) {
|
||||||
CPlugin.log(io);
|
CUIPlugin.log(io);
|
||||||
} finally {
|
} finally {
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
try { reader.close(); } catch (IOException e) {}
|
try { reader.close(); } catch (IOException e) {}
|
||||||
|
|
|
@ -6,7 +6,6 @@ package org.eclipse.cdt.internal.ui.preferences;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CProjectNature;
|
import org.eclipse.cdt.core.CProjectNature;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusTool;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusTool;
|
||||||
|
@ -16,6 +15,7 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
|
||||||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
|
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
|
||||||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringDialogField;
|
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringDialogField;
|
||||||
import org.eclipse.cdt.internal.ui.wizards.swt.MGridLayout;
|
import org.eclipse.cdt.internal.ui.wizards.swt.MGridLayout;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -54,18 +54,18 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
LaunchingDialogFieldsAdapter adapter= new LaunchingDialogFieldsAdapter();
|
LaunchingDialogFieldsAdapter adapter= new LaunchingDialogFieldsAdapter();
|
||||||
|
|
||||||
fArgumentField= new StringDialogField();
|
fArgumentField= new StringDialogField();
|
||||||
fArgumentField.setLabelText(CPlugin.getResourceString(ARGUMENTS + ".label"));
|
fArgumentField.setLabelText(CUIPlugin.getResourceString(ARGUMENTS + ".label"));
|
||||||
fArgumentField.setDialogFieldListener(adapter);
|
fArgumentField.setDialogFieldListener(adapter);
|
||||||
|
|
||||||
fWorkingDirField= new StringButtonDialogField(adapter);
|
fWorkingDirField= new StringButtonDialogField(adapter);
|
||||||
fWorkingDirField.setLabelText(CPlugin.getResourceString(WORKINGDIR + ".label"));
|
fWorkingDirField.setLabelText(CUIPlugin.getResourceString(WORKINGDIR + ".label"));
|
||||||
fWorkingDirField.setButtonLabel(CPlugin.getResourceString(WORKINGDIR + ".browse"));
|
fWorkingDirField.setButtonLabel(CUIPlugin.getResourceString(WORKINGDIR + ".browse"));
|
||||||
fWorkingDirField.setDialogFieldListener(adapter);
|
fWorkingDirField.setDialogFieldListener(adapter);
|
||||||
|
|
||||||
fWorkingDirStatus= new StatusInfo();
|
fWorkingDirStatus= new StatusInfo();
|
||||||
|
|
||||||
fArgumentsPropertyName= new QualifiedName(CPlugin.PLUGIN_ID, "arguments");
|
fArgumentsPropertyName= new QualifiedName(CUIPlugin.PLUGIN_ID, "arguments");
|
||||||
fWorkingDirPropertyName= new QualifiedName(CPlugin.PLUGIN_ID, "workingdir");
|
fWorkingDirPropertyName= new QualifiedName(CUIPlugin.PLUGIN_ID, "workingdir");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,7 +88,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
IFile file= getInputFile();
|
IFile file= getInputFile();
|
||||||
isCProject= (file.getProject().hasNature(CProjectNature.C_NATURE_ID));
|
isCProject= (file.getProject().hasNature(CProjectNature.C_NATURE_ID));
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCProject) {
|
if (isCProject) {
|
||||||
|
@ -97,7 +97,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
initialize();
|
initialize();
|
||||||
} else {
|
} else {
|
||||||
DialogField labelField= new DialogField();
|
DialogField labelField= new DialogField();
|
||||||
labelField.setLabelText(CPlugin.getResourceString(NO_CPROJECT));
|
labelField.setLabelText(CUIPlugin.getResourceString(NO_CPROJECT));
|
||||||
labelField.doFillIntoGrid(composite, 3);
|
labelField.doFillIntoGrid(composite, 3);
|
||||||
}
|
}
|
||||||
WorkbenchHelp.setHelp(parent, ICHelpContextIds.LAUNCH_PROPERTY_PAGE);
|
WorkbenchHelp.setHelp(parent, ICHelpContextIds.LAUNCH_PROPERTY_PAGE);
|
||||||
|
@ -122,7 +122,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
fWorkingDirField.setText(file.getParent().getLocation().toOSString());
|
fWorkingDirField.setText(file.getParent().getLocation().toOSString());
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
file.setPersistentProperty(fWorkingDirPropertyName, fWorkingDirField.getText());
|
file.setPersistentProperty(fWorkingDirPropertyName, fWorkingDirField.getText());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
ErrorDialog.openError(fShell, "Error", null, e.getStatus());
|
ErrorDialog.openError(fShell, "Error", null, e.getStatus());
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
||||||
if (!"".equals(str)) {
|
if (!"".equals(str)) {
|
||||||
IPath path= new Path(str);
|
IPath path= new Path(str);
|
||||||
if (!path.toFile().isDirectory()) {
|
if (!path.toFile().isDirectory()) {
|
||||||
fWorkingDirStatus.setError(CPlugin.getResourceString(ERROR_WORKINGDIR_NOTEXISTS));
|
fWorkingDirStatus.setError(CUIPlugin.getResourceString(ERROR_WORKINGDIR_NOTEXISTS));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ package org.eclipse.cdt.internal.ui.preferences;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
import org.eclipse.jface.preference.FontFieldEditor;
|
import org.eclipse.jface.preference.FontFieldEditor;
|
||||||
|
@ -47,7 +47,7 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
|
||||||
|
|
||||||
public CPluginPreferencePage() {
|
public CPluginPreferencePage() {
|
||||||
super(GRID);
|
super(GRID);
|
||||||
setPreferenceStore(CPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,31 +68,31 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
|
||||||
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
|
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
|
||||||
gd.horizontalSpan= 3;
|
gd.horizontalSpan= 3;
|
||||||
buildText.setLayoutData(gd);
|
buildText.setLayoutData(gd);
|
||||||
buildText.setText(CPlugin.getResourceString(PAGE_DESC));
|
buildText.setText(CUIPlugin.getResourceString(PAGE_DESC));
|
||||||
FileFieldEditor editor= new FileFieldEditor(PREF_BUILD_LOCATION, CPlugin.getResourceString(BUILD_LOC_LABEL), true, parent) {
|
FileFieldEditor editor= new FileFieldEditor(PREF_BUILD_LOCATION, CUIPlugin.getResourceString(BUILD_LOC_LABEL), true, parent) {
|
||||||
protected boolean checkState() {
|
protected boolean checkState() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
addField(editor);
|
addField(editor);
|
||||||
*/
|
*/
|
||||||
BooleanFieldEditor clearConsole= new BooleanFieldEditor(PREF_CLEAR_CONSOLE, CPlugin.getResourceString(CLEAR_CONSOLE_LABEL), parent);
|
BooleanFieldEditor clearConsole= new BooleanFieldEditor(PREF_CLEAR_CONSOLE, CUIPlugin.getResourceString(CLEAR_CONSOLE_LABEL), parent);
|
||||||
addField(clearConsole);
|
addField(clearConsole);
|
||||||
|
|
||||||
BooleanFieldEditor autoOpenConsole = new BooleanFieldEditor(PREF_AUTO_OPEN_CONSOLE, CPlugin.getResourceString(AUTO_OPEN_CONSOLE_LABEL), parent);
|
BooleanFieldEditor autoOpenConsole = new BooleanFieldEditor(PREF_AUTO_OPEN_CONSOLE, CUIPlugin.getResourceString(AUTO_OPEN_CONSOLE_LABEL), parent);
|
||||||
addField(autoOpenConsole);
|
addField(autoOpenConsole);
|
||||||
BooleanFieldEditor consoleOnTop= new BooleanFieldEditor(PREF_CONSOLE_ON_TOP, CPlugin.getResourceString(CONSOLE_ON_TOP_LABEL), parent);
|
BooleanFieldEditor consoleOnTop= new BooleanFieldEditor(PREF_CONSOLE_ON_TOP, CUIPlugin.getResourceString(CONSOLE_ON_TOP_LABEL), parent);
|
||||||
addField(consoleOnTop);
|
addField(consoleOnTop);
|
||||||
|
|
||||||
BooleanFieldEditor linkEditor= new BooleanFieldEditor(PREF_LINK_TO_EDITOR, CPlugin.getResourceString(LINK_TO_EDITOR_LABEL), parent);
|
BooleanFieldEditor linkEditor= new BooleanFieldEditor(PREF_LINK_TO_EDITOR, CUIPlugin.getResourceString(LINK_TO_EDITOR_LABEL), parent);
|
||||||
addField(linkEditor);
|
addField(linkEditor);
|
||||||
|
|
||||||
BooleanFieldEditor showCUChildrenEditor= new BooleanFieldEditor(SHOW_CU_CHILDREN, CPlugin.getResourceString(SHOW_CU_CHILDREN_LABEL), parent);
|
BooleanFieldEditor showCUChildrenEditor= new BooleanFieldEditor(SHOW_CU_CHILDREN, CUIPlugin.getResourceString(SHOW_CU_CHILDREN_LABEL), parent);
|
||||||
addField(showCUChildrenEditor);
|
addField(showCUChildrenEditor);
|
||||||
|
|
||||||
addField(new FontFieldEditor(PREF_CONSOLE_FONT, CPlugin.getResourceString(CONSOLE_FONT_LABEL), parent));
|
addField(new FontFieldEditor(PREF_CONSOLE_FONT, CUIPlugin.getResourceString(CONSOLE_FONT_LABEL), parent));
|
||||||
|
|
||||||
//addField(new FontFieldEditor(AbstractTextEditor.PREFERENCE_FONT, CPlugin.getResourceString(EDITOR_FONT_LABEL), parent));
|
//addField(new FontFieldEditor(AbstractTextEditor.PREFERENCE_FONT, CUIPlugin.getResourceString(EDITOR_FONT_LABEL), parent));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,33 +101,33 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
|
||||||
* be cleared before each build.
|
* be cleared before each build.
|
||||||
*/
|
*/
|
||||||
public static boolean isClearBuildConsole() {
|
public static boolean isClearBuildConsole() {
|
||||||
return CPlugin.getDefault().getPreferenceStore().getBoolean(PREF_CLEAR_CONSOLE);
|
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PREF_CLEAR_CONSOLE);
|
||||||
}
|
}
|
||||||
public static boolean isAutoOpenConsole() {
|
public static boolean isAutoOpenConsole() {
|
||||||
return CPlugin.getDefault().getPreferenceStore().getBoolean(PREF_AUTO_OPEN_CONSOLE);
|
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PREF_AUTO_OPEN_CONSOLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isConsoleOnTop() {
|
public static boolean isConsoleOnTop() {
|
||||||
return CPlugin.getDefault().getPreferenceStore().getBoolean(PREF_CONSOLE_ON_TOP);
|
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PREF_CONSOLE_ON_TOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLinkToEditor() {
|
public static boolean isLinkToEditor() {
|
||||||
return CPlugin.getDefault().getPreferenceStore().getBoolean(PREF_LINK_TO_EDITOR);
|
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PREF_LINK_TO_EDITOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean showCompilationUnitChildren() {
|
public static boolean showCompilationUnitChildren() {
|
||||||
return CPlugin.getDefault().getPreferenceStore().getBoolean(SHOW_CU_CHILDREN);
|
return CUIPlugin.getDefault().getPreferenceStore().getBoolean(SHOW_CU_CHILDREN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current preference setting of the build command location.
|
* Returns the current preference setting of the build command location.
|
||||||
*/
|
*/
|
||||||
// public static String getBuildLocation() {
|
// public static String getBuildLocation() {
|
||||||
// return CPlugin.getDefault().getPreferenceStore().getString(PREF_BUILD_LOCATION);
|
// return CUIPlugin.getDefault().getPreferenceStore().getString(PREF_BUILD_LOCATION);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// public static boolean isStopOnError() {
|
// public static boolean isStopOnError() {
|
||||||
// return CPlugin.getDefault().getPreferenceStore().getBoolean(PREF_STOP_ON_ERROR);
|
// return CUIPlugin.getDefault().getPreferenceStore().getBoolean(PREF_STOP_ON_ERROR);
|
||||||
// }
|
// }
|
||||||
/**
|
/**
|
||||||
* @see IWorkbenchPreferencePage#init
|
* @see IWorkbenchPreferencePage#init
|
||||||
|
|
|
@ -5,10 +5,10 @@ package org.eclipse.cdt.internal.ui.preferences;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener;
|
import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusTool;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusTool;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.wizards.ReferenceBlock;
|
import org.eclipse.cdt.ui.wizards.ReferenceBlock;
|
||||||
import org.eclipse.cdt.ui.wizards.SettingsBlock;
|
import org.eclipse.cdt.ui.wizards.SettingsBlock;
|
||||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||||
|
@ -76,7 +76,7 @@ public class CProjectPropertyPage extends PropertyPage implements IStatusChangeL
|
||||||
|
|
||||||
private void contentForClosedProject(Composite parent) {
|
private void contentForClosedProject(Composite parent) {
|
||||||
Label label= new Label(parent, SWT.LEFT);
|
Label label= new Label(parent, SWT.LEFT);
|
||||||
label.setText(CPlugin.getResourceString(MSG_CLOSEDPROJECT));
|
label.setText(CUIPlugin.getResourceString(MSG_CLOSEDPROJECT));
|
||||||
label.setFont(parent.getFont());
|
label.setFont(parent.getFont());
|
||||||
|
|
||||||
noDefaultAndApplyButton();
|
noDefaultAndApplyButton();
|
||||||
|
|
|
@ -9,7 +9,6 @@ import org.eclipse.cdt.internal.corext.template.ContextTypeRegistry;
|
||||||
import org.eclipse.cdt.internal.corext.template.Template;
|
import org.eclipse.cdt.internal.corext.template.Template;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateTranslator;
|
import org.eclipse.cdt.internal.corext.template.TemplateTranslator;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusDialog;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusDialog;
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||||
|
@ -19,6 +18,8 @@ import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
import org.eclipse.cdt.internal.ui.text.ContentAssistPreference;
|
import org.eclipse.cdt.internal.ui.text.ContentAssistPreference;
|
||||||
import org.eclipse.cdt.internal.ui.text.template.TemplateVariableProcessor;
|
import org.eclipse.cdt.internal.ui.text.template.TemplateVariableProcessor;
|
||||||
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -101,7 +102,7 @@ public class EditTemplateDialog extends StatusDialog {
|
||||||
*/
|
*/
|
||||||
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
|
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
|
||||||
|
|
||||||
IPreferenceStore store= CPlugin.getDefault().getPreferenceStore();
|
IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
|
||||||
ContentAssistant assistant= new ContentAssistant();
|
ContentAssistant assistant= new ContentAssistant();
|
||||||
assistant.setContentAssistProcessor(fProcessor, IDocument.DEFAULT_CONTENT_TYPE);
|
assistant.setContentAssistProcessor(fProcessor, IDocument.DEFAULT_CONTENT_TYPE);
|
||||||
|
@ -329,7 +330,7 @@ public class EditTemplateDialog extends StatusDialog {
|
||||||
|
|
||||||
private SourceViewer createEditor(Composite parent) {
|
private SourceViewer createEditor(Composite parent) {
|
||||||
SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
|
SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
|
||||||
CTextTools tools= CPlugin.getDefault().getTextTools();
|
CTextTools tools= CUIPlugin.getDefault().getTextTools();
|
||||||
viewer.configure(new SimpleCSourceViewerConfiguration(tools, null, fProcessor));
|
viewer.configure(new SimpleCSourceViewerConfiguration(tools, null, fProcessor));
|
||||||
viewer.setEditable(true);
|
viewer.setEditable(true);
|
||||||
viewer.setDocument(new Document(fTemplate.getPattern()));
|
viewer.setDocument(new Document(fTemplate.getPattern()));
|
||||||
|
@ -348,7 +349,7 @@ public class EditTemplateDialog extends StatusDialog {
|
||||||
try {
|
try {
|
||||||
fTranslator.translate(event.getDocumentEvent().getDocument().get());
|
fTranslator.translate(event.getDocumentEvent().getDocument().get());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
// XXX dialog
|
// XXX dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,13 @@ import org.eclipse.cdt.internal.corext.template.Template;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateSet;
|
import org.eclipse.cdt.internal.corext.template.TemplateSet;
|
||||||
import org.eclipse.cdt.internal.corext.template.Templates;
|
import org.eclipse.cdt.internal.corext.template.Templates;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||||
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
import org.eclipse.cdt.internal.ui.text.CSourceViewerConfiguration;
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
import org.eclipse.cdt.internal.ui.text.template.TemplateContentProvider;
|
import org.eclipse.cdt.internal.ui.text.template.TemplateContentProvider;
|
||||||
import org.eclipse.cdt.internal.ui.text.template.TemplateLabelProvider;
|
import org.eclipse.cdt.internal.ui.text.template.TemplateLabelProvider;
|
||||||
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
|
@ -65,7 +65,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
|
||||||
public class TemplatePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
public class TemplatePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
||||||
|
|
||||||
// preference store keys
|
// preference store keys
|
||||||
private static final String PREF_FORMAT_TEMPLATES= CPlugin.PLUGIN_ID + ".template.format"; //$NON-NLS-1$
|
private static final String PREF_FORMAT_TEMPLATES= CUIPlugin.PLUGIN_ID + ".template.format"; //$NON-NLS-1$
|
||||||
|
|
||||||
private Templates fTemplates;
|
private Templates fTemplates;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
public TemplatePreferencePage() {
|
public TemplatePreferencePage() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
setPreferenceStore(CPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
setDescription(TemplateMessages.getString("TemplatePreferencePage.message")); //$NON-NLS-1$
|
setDescription(TemplateMessages.getString("TemplatePreferencePage.message")); //$NON-NLS-1$
|
||||||
|
|
||||||
fTemplates= Templates.getInstance();
|
fTemplates= Templates.getInstance();
|
||||||
|
@ -263,7 +263,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
fTableViewer.setAllChecked(false);
|
fTableViewer.setAllChecked(false);
|
||||||
fTableViewer.setCheckedElements(getEnabledTemplates());
|
fTableViewer.setCheckedElements(getEnabledTemplates());
|
||||||
|
|
||||||
//IPreferenceStore prefs= CPlugin.getDefault().getPreferenceStore();
|
//IPreferenceStore prefs= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
//fFormatButton.setSelection(prefs.getBoolean(PREF_FORMAT_TEMPLATES));
|
//fFormatButton.setSelection(prefs.getBoolean(PREF_FORMAT_TEMPLATES));
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
@ -293,7 +293,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
label.setLayoutData(data);
|
label.setLayoutData(data);
|
||||||
|
|
||||||
SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
|
SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
|
||||||
CTextTools tools= CPlugin.getDefault().getTextTools();
|
CTextTools tools= CUIPlugin.getDefault().getTextTools();
|
||||||
viewer.configure(new CSourceViewerConfiguration(tools, null));
|
viewer.configure(new CSourceViewerConfiguration(tools, null));
|
||||||
viewer.setEditable(false);
|
viewer.setEditable(false);
|
||||||
viewer.setDocument(new Document());
|
viewer.setDocument(new Document());
|
||||||
|
@ -464,7 +464,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
try {
|
try {
|
||||||
templateSet.saveToFile(file);
|
templateSet.saveToFile(file);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openWriteErrorDialog(e);
|
openWriteErrorDialog(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -514,13 +514,13 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
* @see PreferencePage#performDefaults()
|
* @see PreferencePage#performDefaults()
|
||||||
*/
|
*/
|
||||||
protected void performDefaults() {
|
protected void performDefaults() {
|
||||||
//IPreferenceStore prefs= CPlugin.getDefault().getPreferenceStore();
|
//IPreferenceStore prefs= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
//fFormatButton.setSelection(prefs.getDefaultBoolean(PREF_FORMAT_TEMPLATES));
|
//fFormatButton.setSelection(prefs.getDefaultBoolean(PREF_FORMAT_TEMPLATES));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fTemplates.restoreDefaults();
|
fTemplates.restoreDefaults();
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openReadErrorDialog(e);
|
openReadErrorDialog(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,13 +534,13 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
* @see PreferencePage#performOk()
|
* @see PreferencePage#performOk()
|
||||||
*/
|
*/
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
//IPreferenceStore prefs= CPlugin.getDefault().getPreferenceStore();
|
//IPreferenceStore prefs= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
//prefs.setValue(PREF_FORMAT_TEMPLATES, fFormatButton.getSelection());
|
//prefs.setValue(PREF_FORMAT_TEMPLATES, fFormatButton.getSelection());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fTemplates.save();
|
fTemplates.save();
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openWriteErrorDialog(e);
|
openWriteErrorDialog(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
try {
|
try {
|
||||||
fTemplates.reset();
|
fTemplates.reset();
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openReadErrorDialog(e);
|
openReadErrorDialog(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean useCodeFormatter() {
|
public static boolean useCodeFormatter() {
|
||||||
IPreferenceStore prefs= CPlugin.getDefault().getPreferenceStore();
|
IPreferenceStore prefs= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
return prefs.getBoolean(PREF_FORMAT_TEMPLATES);
|
return prefs.getBoolean(PREF_FORMAT_TEMPLATES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,9 @@ import org.eclipse.jface.text.source.ISourceViewer;
|
||||||
import org.eclipse.ui.texteditor.MarkerAnnotation;
|
import org.eclipse.ui.texteditor.MarkerAnnotation;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.text.LineBreakingReader;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
|
|
||||||
|
|
||||||
public class CAnnotationHover implements IAnnotationHover {
|
public class CAnnotationHover implements IAnnotationHover {
|
||||||
|
@ -140,7 +139,7 @@ public class CAnnotationHover implements IAnnotationHover {
|
||||||
}
|
}
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
} finally {
|
} finally {
|
||||||
gc.dispose();
|
gc.dispose();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.eclipse.jface.text.DocumentCommand;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auto indent strategy sensitive to brackets.
|
* Auto indent strategy sensitive to brackets.
|
||||||
|
@ -161,7 +161,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (BadLocationException excp) {
|
} catch (BadLocationException excp) {
|
||||||
CPlugin.log(excp);
|
CUIPlugin.log(excp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy {
|
||||||
|
|
||||||
|
|
||||||
} catch (BadLocationException excp) {
|
} catch (BadLocationException excp) {
|
||||||
CPlugin.log(excp);
|
CUIPlugin.log(excp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ import org.eclipse.cdt.internal.corext.template.ContextType;
|
||||||
import org.eclipse.cdt.internal.corext.template.ContextTypeRegistry;
|
import org.eclipse.cdt.internal.corext.template.ContextTypeRegistry;
|
||||||
import org.eclipse.cdt.internal.ui.CCompletionContributorManager;
|
import org.eclipse.cdt.internal.ui.CCompletionContributorManager;
|
||||||
import org.eclipse.cdt.internal.ui.CElementLabelProvider;
|
import org.eclipse.cdt.internal.ui.CElementLabelProvider;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
import org.eclipse.cdt.internal.ui.text.template.TemplateEngine;
|
import org.eclipse.cdt.internal.ui.text.template.TemplateEngine;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.IFunctionSummary;
|
import org.eclipse.cdt.ui.IFunctionSummary;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -66,7 +66,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
||||||
fComparator= new CCompletionProposalComparator();
|
fComparator= new CCompletionProposalComparator();
|
||||||
|
|
||||||
fElementLabelProvider = new CElementLabelProvider();
|
fElementLabelProvider = new CElementLabelProvider();
|
||||||
//fImageRegistry= CPlugin.getDefault().getImageRegistry();
|
//fImageRegistry= CUIPlugin.getDefault().getImageRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -169,7 +169,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
||||||
results= evalProposals(document, offset, length);
|
results= evalProposals(document, offset, length);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(results == null)
|
if(results == null)
|
||||||
|
@ -181,7 +181,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
||||||
fTemplateEngine.complete(viewer, documentOffset, null);
|
fTemplateEngine.complete(viewer, documentOffset, null);
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
System.out.println("Template Exception");
|
System.out.println("Template Exception");
|
||||||
CPlugin.log(x);
|
CUIPlugin.log(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
ICCompletionProposal[] templateResults= fTemplateEngine.getResults();
|
ICCompletionProposal[] templateResults= fTemplateEngine.getResults();
|
||||||
|
@ -201,7 +201,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
||||||
* applies to all proposals and not just those of the compilation unit.
|
* applies to all proposals and not just those of the compilation unit.
|
||||||
*/
|
*/
|
||||||
order(results);
|
order(results);
|
||||||
if((results.length == 1) && (CPlugin.getDefault().getPreferenceStore().getBoolean(ContentAssistPreference.AUTOINSERT))) {
|
if((results.length == 1) && (CUIPlugin.getDefault().getPreferenceStore().getBoolean(ContentAssistPreference.AUTOINSERT))) {
|
||||||
results[0].apply(document);
|
results[0].apply(document);
|
||||||
// Trick the content assistant into thinking we have no proposals
|
// Trick the content assistant into thinking we have no proposals
|
||||||
return new ICCompletionProposal[0];
|
return new ICCompletionProposal[0];
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class CFormattingStrategy implements IFormattingStrategy {
|
||||||
* @see IFormattingStrategy#format(String, boolean, String, int[])
|
* @see IFormattingStrategy#format(String, boolean, String, int[])
|
||||||
*/
|
*/
|
||||||
public String format(String content, boolean isLineStart, String indentation, int[] positions) {
|
public String format(String content, boolean isLineStart, String indentation, int[] positions) {
|
||||||
//ConfigurableOption[] options= CPlugin.getDefault().getCodeFormatterOptions();
|
//ConfigurableOption[] options= CUIPlugin.getDefault().getCodeFormatterOptions();
|
||||||
CCodeFormatter formatter= new CCodeFormatter(/* null options */);
|
CCodeFormatter formatter= new CCodeFormatter(/* null options */);
|
||||||
|
|
||||||
//IDocument doc= fViewer.getDocument();
|
//IDocument doc= fViewer.getDocument();
|
||||||
|
|
|
@ -7,9 +7,9 @@ package org.eclipse.cdt.internal.ui.text;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditorTextHoverDispatcher;
|
import org.eclipse.cdt.internal.ui.editor.CEditorTextHoverDispatcher;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.ICDTConstants;
|
import org.eclipse.cdt.ui.ICDTConstants;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
|
@ -276,7 +276,7 @@ public class CSourceViewerConfiguration extends SourceViewerConfiguration {
|
||||||
public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
|
public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
|
||||||
HashMap textHovers = new HashMap( 3 );
|
HashMap textHovers = new HashMap( 3 );
|
||||||
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
||||||
IExtensionPoint point = pluginRegistry.getExtensionPoint( CPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
|
IExtensionPoint point = pluginRegistry.getExtensionPoint( CUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
|
||||||
ICDTConstants.EP_TEXT_HOVERS );
|
ICDTConstants.EP_TEXT_HOVERS );
|
||||||
if ( point != null )
|
if ( point != null )
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ public class CSourceViewerConfiguration extends SourceViewerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IPreferenceStore getPreferenceStore() {
|
protected IPreferenceStore getPreferenceStore() {
|
||||||
return CPlugin.getDefault().getPreferenceStore();
|
return CUIPlugin.getDefault().getPreferenceStore();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ package org.eclipse.cdt.internal.ui.text;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.text.IDocumentPartitioner;
|
import org.eclipse.jface.text.IDocumentPartitioner;
|
||||||
|
@ -56,7 +56,7 @@ public class CTextTools {
|
||||||
*/
|
*/
|
||||||
public CTextTools(IPreferenceStore store) {
|
public CTextTools(IPreferenceStore store) {
|
||||||
if(store == null) {
|
if(store == null) {
|
||||||
store = CPlugin.getDefault().getPreferenceStore();
|
store = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
}
|
}
|
||||||
fPreferenceStore = store;
|
fPreferenceStore = store;
|
||||||
fPreferenceStore.addPropertyChangeListener(fPreferenceListener);
|
fPreferenceStore.addPropertyChangeListener(fPreferenceListener);
|
||||||
|
|
|
@ -8,7 +8,7 @@ package org.eclipse.cdt.internal.ui.text;
|
||||||
import org.eclipse.swt.graphics.Color;
|
import org.eclipse.swt.graphics.Color;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
@ -53,7 +53,7 @@ public class ContentAssistPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Color getColor(IPreferenceStore store, String key) {
|
private static Color getColor(IPreferenceStore store, String key) {
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
return getColor(store, key, textTools.getColorManager());
|
return getColor(store, key, textTools.getColorManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public class ContentAssistPreference {
|
||||||
*/
|
*/
|
||||||
public static void configure(ContentAssistant assistant, IPreferenceStore store) {
|
public static void configure(ContentAssistant assistant, IPreferenceStore store) {
|
||||||
|
|
||||||
CTextTools textTools= CPlugin.getDefault().getTextTools();
|
CTextTools textTools= CUIPlugin.getDefault().getTextTools();
|
||||||
IColorManager manager= textTools.getColorManager();
|
IColorManager manager= textTools.getColorManager();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ package org.eclipse.cdt.internal.ui.text.link;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -74,7 +75,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
||||||
try {
|
try {
|
||||||
document.replace(fReplacePosition.getOffset() + fReplaceDeltaOffset, fReplaceLength, fReplaceText);
|
document.replace(fReplacePosition.getOffset() + fReplaceDeltaOffset, fReplaceLength, fReplaceText);
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
// TBD
|
// TBD
|
||||||
}
|
}
|
||||||
document.addDocumentListener(owner);
|
document.addDocumentListener(owner);
|
||||||
|
@ -139,7 +140,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
||||||
try {
|
try {
|
||||||
fDocument.addPosition(LINKED_POSITION, new TypedPosition(offset, length, type));
|
fDocument.addPosition(LINKED_POSITION, new TypedPosition(offset, length, type));
|
||||||
} catch (BadPositionCategoryException e) {
|
} catch (BadPositionCategoryException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,11 +184,11 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
||||||
fDocument.removePositionCategory(LINKED_POSITION);
|
fDocument.removePositionCategory(LINKED_POSITION);
|
||||||
|
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
|
|
||||||
} catch (BadPositionCategoryException e) {
|
} catch (BadPositionCategoryException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -263,7 +264,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
||||||
return positions;
|
return positions;
|
||||||
|
|
||||||
} catch (BadPositionCategoryException e) {
|
} catch (BadPositionCategoryException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ import org.eclipse.swt.graphics.RGB;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
|
@ -63,7 +63,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
|
||||||
|
|
||||||
private static final String CARET_POSITION= "LinkedPositionUI.caret.position";
|
private static final String CARET_POSITION= "LinkedPositionUI.caret.position";
|
||||||
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
|
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
|
||||||
private static final IPreferenceStore fgStore= CPlugin.getDefault().getPreferenceStore();
|
private static final IPreferenceStore fgStore= CUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
|
||||||
private final ITextViewer fViewer;
|
private final ITextViewer fViewer;
|
||||||
private final LinkedPositionManager fManager;
|
private final LinkedPositionManager fManager;
|
||||||
|
@ -184,7 +184,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
|
||||||
openErrorDialog(fViewer.getTextWidget().getShell(), e);
|
openErrorDialog(fViewer.getTextWidget().getShell(), e);
|
||||||
|
|
||||||
} catch (BadPositionCategoryException e) {
|
} catch (BadPositionCategoryException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
|
||||||
((flags & DOCUMENT_CHANGED) != 0));
|
((flags & DOCUMENT_CHANGED) != 0));
|
||||||
|
|
||||||
} catch (BadPositionCategoryException e) {
|
} catch (BadPositionCategoryException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
Assert.isTrue(false);
|
Assert.isTrue(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ import org.eclipse.cdt.internal.corext.template.TemplateBuffer;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateContext;
|
import org.eclipse.cdt.internal.corext.template.TemplateContext;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplatePosition;
|
import org.eclipse.cdt.internal.corext.template.TemplatePosition;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.ICCompletionProposal;
|
import org.eclipse.cdt.internal.ui.text.ICCompletionProposal;
|
||||||
import org.eclipse.cdt.internal.ui.text.link.LinkedPositionManager;
|
import org.eclipse.cdt.internal.ui.text.link.LinkedPositionManager;
|
||||||
import org.eclipse.cdt.internal.ui.text.link.LinkedPositionUI;
|
import org.eclipse.cdt.internal.ui.text.link.LinkedPositionUI;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
@ -100,11 +100,11 @@ public class TemplateProposal implements ICCompletionProposal {
|
||||||
fSelectedRegion= editor.getSelectedRegion();
|
fSelectedRegion= editor.getSelectedRegion();
|
||||||
|
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openErrorDialog(e);
|
openErrorDialog(e);
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openErrorDialog(e);
|
openErrorDialog(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ public class TemplateProposal implements ICCompletionProposal {
|
||||||
return textToHTML(fTemplateBuffer.getString());
|
return textToHTML(fTemplateBuffer.getString());
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
openErrorDialog(e);
|
openErrorDialog(e);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
import org.eclipse.cdt.internal.corext.template.TemplateMessages;
|
||||||
import org.eclipse.cdt.internal.corext.template.TemplateVariable;
|
import org.eclipse.cdt.internal.corext.template.TemplateVariable;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.text.BadLocationException;
|
import org.eclipse.jface.text.BadLocationException;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
@ -59,7 +59,7 @@ public class TemplateVariableProposal implements ICompletionProposal {
|
||||||
fSelection= new Point(fOffset + variable.length(), 0);
|
fSelection= new Point(fOffset + variable.length(), 0);
|
||||||
|
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
|
|
||||||
Shell shell= fViewer.getTextWidget().getShell();
|
Shell shell= fViewer.getTextWidget().getShell();
|
||||||
MessageDialog.openError(shell, TemplateMessages.getString("TemplateVariableProposal.error.title"), e.getMessage()); //$NON-NLS-1$
|
MessageDialog.openError(shell, TemplateMessages.getString("TemplateVariableProposal.error.title"), e.getMessage()); //$NON-NLS-1$
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.IBinary;
|
import org.eclipse.cdt.core.model.IBinary;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.resources.FileStorage;
|
import org.eclipse.cdt.core.resources.FileStorage;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
||||||
|
|
||||||
public class EditorUtility {
|
public class EditorUtility {
|
||||||
|
@ -40,7 +40,7 @@ public class EditorUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEditorPart openInEditor (IFile file) throws PartInitException {
|
public static IEditorPart openInEditor (IFile file) throws PartInitException {
|
||||||
IWorkbenchWindow window= CPlugin.getActiveWorkbenchWindow();
|
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
IWorkbenchPage p= window.getActivePage();
|
IWorkbenchPage p= window.getActivePage();
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
@ -88,7 +88,7 @@ public class EditorUtility {
|
||||||
|
|
||||||
public static IEditorPart openInEditor (IStorage store, String name) throws PartInitException {
|
public static IEditorPart openInEditor (IStorage store, String name) throws PartInitException {
|
||||||
IEditorInput ei = new ExternalEditorInput(store);
|
IEditorInput ei = new ExternalEditorInput(store);
|
||||||
IWorkbenchWindow window= CPlugin.getActiveWorkbenchWindow();
|
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
IWorkbenchPage p = window.getActivePage();
|
IWorkbenchPage p = window.getActivePage();
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
|
|
@ -7,7 +7,8 @@ package org.eclipse.cdt.internal.ui.util;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICModelMarker;
|
import org.eclipse.cdt.core.model.ICModelMarker;
|
||||||
import org.eclipse.cdt.core.CProjectNature;
|
import org.eclipse.cdt.core.CProjectNature;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +110,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
||||||
if (delta != null)
|
if (delta != null)
|
||||||
delta.accept(new ProjectErrorVisitor(changedElements));
|
delta.accept(new ProjectErrorVisitor(changedElements));
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e.getStatus());
|
CUIPlugin.log(e.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedElements.size() > 0) {
|
if (changedElements.size() > 0) {
|
||||||
|
@ -122,7 +123,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
||||||
*/
|
*/
|
||||||
public void addListener(IProblemChangedListener listener) {
|
public void addListener(IProblemChangedListener listener) {
|
||||||
if (fListeners.isEmpty()) {
|
if (fListeners.isEmpty()) {
|
||||||
CPlugin.getWorkspace().addResourceChangeListener(this);
|
CUIPlugin.getWorkspace().addResourceChangeListener(this);
|
||||||
}
|
}
|
||||||
fListeners.add(listener);
|
fListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
@ -133,7 +134,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
||||||
public void removeListener(IProblemChangedListener listener) {
|
public void removeListener(IProblemChangedListener listener) {
|
||||||
fListeners.remove(listener);
|
fListeners.remove(listener);
|
||||||
if (fListeners.isEmpty()) {
|
if (fListeners.isEmpty()) {
|
||||||
CPlugin.getWorkspace().removeResourceChangeListener(this);
|
CUIPlugin.getWorkspace().removeResourceChangeListener(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,26 +16,26 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
||||||
import org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard;
|
import org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
public class OpenNewFileWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
public class OpenNewFileWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
||||||
|
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
BasicNewFileResourceWizard wizard= new BasicNewFileResourceWizard();
|
BasicNewFileResourceWizard wizard= new BasicNewFileResourceWizard();
|
||||||
wizard.init(CPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
wizard.init(CUIPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
||||||
wizard.setNeedsProgressMonitor(true);
|
wizard.setNeedsProgressMonitor(true);
|
||||||
WizardDialog dialog=
|
WizardDialog dialog=
|
||||||
new WizardDialog(CPlugin.getActiveWorkbenchShell(), wizard);
|
new WizardDialog(CUIPlugin.getActiveWorkbenchShell(), wizard);
|
||||||
dialog.create();
|
dialog.create();
|
||||||
dialog.getShell().setText(
|
dialog.getShell().setText(
|
||||||
CPlugin.getResourceString("OpenNewFileWizardAction.title")); //$NON-NLS-1$
|
CUIPlugin.getResourceString("OpenNewFileWizardAction.title")); //$NON-NLS-1$
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected IStructuredSelection getCurrentSelection() {
|
protected IStructuredSelection getCurrentSelection() {
|
||||||
IWorkbenchWindow window= CPlugin.getActiveWorkbenchWindow();
|
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
ISelection selection= window.getSelectionService().getSelection();
|
ISelection selection= window.getSelectionService().getSelection();
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
|
|
@ -15,24 +15,24 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
||||||
import org.eclipse.ui.wizards.newresource.BasicNewFolderResourceWizard;
|
import org.eclipse.ui.wizards.newresource.BasicNewFolderResourceWizard;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
public class OpenNewFolderWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
public class OpenNewFolderWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
BasicNewFolderResourceWizard wizard= new BasicNewFolderResourceWizard();
|
BasicNewFolderResourceWizard wizard= new BasicNewFolderResourceWizard();
|
||||||
wizard.init(CPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
wizard.init(CUIPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
||||||
wizard.setNeedsProgressMonitor(true);
|
wizard.setNeedsProgressMonitor(true);
|
||||||
WizardDialog dialog=
|
WizardDialog dialog=
|
||||||
new WizardDialog(CPlugin.getActiveWorkbenchShell(), wizard);
|
new WizardDialog(CUIPlugin.getActiveWorkbenchShell(), wizard);
|
||||||
dialog.create();
|
dialog.create();
|
||||||
dialog.getShell().setText(
|
dialog.getShell().setText(
|
||||||
CPlugin.getResourceString("OpenNewFolderWizardAction.title")); //$NON-NLS-1$
|
CUIPlugin.getResourceString("OpenNewFolderWizardAction.title")); //$NON-NLS-1$
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IStructuredSelection getCurrentSelection() {
|
protected IStructuredSelection getCurrentSelection() {
|
||||||
IWorkbenchWindow window= CPlugin.getActiveWorkbenchWindow();
|
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
ISelection selection= window.getSelectionService().getSelection();
|
ISelection selection= window.getSelectionService().getSelection();
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
package org.eclipse.cdt.internal.ui;
|
package org.eclipse.cdt.ui;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
* (c) Copyright IBM Corp. 2000, 2001.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.ConsoleOutputStream;
|
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.resources.IConsole;
|
import org.eclipse.cdt.internal.ui.BuildConsoleManager;
|
||||||
|
import org.eclipse.cdt.internal.ui.CElementAdapterFactory;
|
||||||
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.internal.ui.ResourceAdapterFactory;
|
||||||
import org.eclipse.cdt.internal.ui.cview.CView;
|
import org.eclipse.cdt.internal.ui.cview.CView;
|
||||||
import org.eclipse.cdt.internal.ui.editor.CDocumentProvider;
|
import org.eclipse.cdt.internal.ui.editor.CDocumentProvider;
|
||||||
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextTools;
|
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextTools;
|
||||||
|
@ -22,7 +23,6 @@ import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||||
import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry;
|
import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry;
|
||||||
import org.eclipse.cdt.internal.ui.util.ProblemMarkerManager;
|
import org.eclipse.cdt.internal.ui.util.ProblemMarkerManager;
|
||||||
import org.eclipse.core.resources.IProject;
|
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
|
@ -33,211 +33,148 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.text.BadLocationException;
|
|
||||||
import org.eclipse.jface.text.Document;
|
|
||||||
import org.eclipse.jface.text.IDocument;
|
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IViewPart;
|
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.PartInitException;
|
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
|
|
||||||
|
public class CUIPlugin extends AbstractUIPlugin {
|
||||||
|
|
||||||
public class CPlugin extends AbstractUIPlugin {
|
public static final String PLUGIN_ID = "org.eclipse.cdt.ui";
|
||||||
|
public static final String PLUGIN_CORE_ID = "org.eclipse.cdt.core";
|
||||||
public static final String PLUGIN_ID= "org.eclipse.cdt.ui";
|
public static final String EDITOR_ID = PLUGIN_ID + ".editor.CEditor";
|
||||||
public static final String PLUGIN_CORE_ID= "org.eclipse.cdt.core";
|
public static final String CONSOLE_ID = PLUGIN_ID + ".BuildConsoleView";
|
||||||
public static final String EDITOR_ID= PLUGIN_ID + ".editor.CEditor";
|
public static final String CVIEW_ID = PLUGIN_ID + ".CView";
|
||||||
public static final String CONSOLE_ID= PLUGIN_ID + ".BuildConsoleView";
|
public static final String MAKEVIEW_ID = PLUGIN_ID + ".MakeView";
|
||||||
public static final String CVIEW_ID= PLUGIN_ID + ".CView";
|
public static final String C_PROBLEMMARKER = PLUGIN_CORE_ID + ".problem";
|
||||||
public static final String MAKEVIEW_ID= PLUGIN_ID + ".MakeView";
|
|
||||||
public static final String C_PROBLEMMARKER= PLUGIN_CORE_ID + ".problem";
|
|
||||||
|
|
||||||
public static final String C_PROJECT_WIZARD_ID= PLUGIN_ID + ".wizards.StdCWizard";
|
public static final String C_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCWizard";
|
||||||
public static final String CPP_PROJECT_WIZARD_ID= PLUGIN_ID + ".wizards.StdCCWizard";
|
public static final String CPP_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCCWizard";
|
||||||
|
|
||||||
public static final String FILE_WIZARD_ID= PLUGIN_ID + ".wizards.new.BasicNewFileResourceWizard";
|
public static final String FILE_WIZARD_ID = PLUGIN_ID + ".wizards.new.BasicNewFileResourceWizard";
|
||||||
public static final String FOLDER_WIZARD_ID= PLUGIN_ID + ".wizards.new.BasicNewFolderResourceWizard";
|
public static final String FOLDER_WIZARD_ID = PLUGIN_ID + ".wizards.new.BasicNewFolderResourceWizard";
|
||||||
|
|
||||||
public static final String FOLDER_ACTION_SET_ID= PLUGIN_ID + ".CFolderActionSet";
|
public static final String FOLDER_ACTION_SET_ID = PLUGIN_ID + ".CFolderActionSet";
|
||||||
public static final String BUILDER_ID= PLUGIN_CORE_ID + ".cbuilder";
|
public static final String BUILDER_ID = PLUGIN_CORE_ID + ".cbuilder";
|
||||||
|
|
||||||
private static CPlugin fgCPlugin;
|
private static CUIPlugin fgCPlugin;
|
||||||
private static ResourceBundle fgResourceBundle;
|
private static ResourceBundle fgResourceBundle;
|
||||||
private ImageDescriptorRegistry fImageDescriptorRegistry;
|
private ImageDescriptorRegistry fImageDescriptorRegistry;
|
||||||
|
|
||||||
static String SEPARATOR = System.getProperty("file.separator");
|
static String SEPARATOR = System.getProperty("file.separator");
|
||||||
|
|
||||||
// -------- static methods --------
|
// -------- static methods --------
|
||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
fgResourceBundle= ResourceBundle.getBundle("org.eclipse.cdt.internal.ui.CPluginResources");
|
fgResourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.internal.ui.CPluginResources");
|
||||||
} catch (MissingResourceException x) {
|
}
|
||||||
fgResourceBundle= null;
|
catch (MissingResourceException x) {
|
||||||
|
fgResourceBundle = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getResourceString(String key) {
|
public static String getResourceString(String key) {
|
||||||
try {
|
try {
|
||||||
return fgResourceBundle.getString(key);
|
return fgResourceBundle.getString(key);
|
||||||
} catch (MissingResourceException e) {
|
}
|
||||||
|
catch (MissingResourceException e) {
|
||||||
return "!" + key + "!";
|
return "!" + key + "!";
|
||||||
} catch (NullPointerException e) {
|
}
|
||||||
|
catch (NullPointerException e) {
|
||||||
return "#" + key + "#";
|
return "#" + key + "#";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkspace getWorkspace() {
|
public static IWorkspace getWorkspace() {
|
||||||
return ResourcesPlugin.getWorkspace();
|
return ResourcesPlugin.getWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFormattedString(String key, String arg) {
|
public static String getFormattedString(String key, String arg) {
|
||||||
return MessageFormat.format(getResourceString(key), new String[] { arg });
|
return MessageFormat.format(getResourceString(key), new String[] { arg });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFormattedString(String key, String[] args) {
|
public static String getFormattedString(String key, String[] args) {
|
||||||
return MessageFormat.format(getResourceString(key), args);
|
return MessageFormat.format(getResourceString(key), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceBundle getResourceBundle() {
|
public static ResourceBundle getResourceBundle() {
|
||||||
return fgResourceBundle;
|
return fgResourceBundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Shell getActiveWorkbenchShell() {
|
public static Shell getActiveWorkbenchShell() {
|
||||||
return getActiveWorkbenchWindow().getShell();
|
return getActiveWorkbenchWindow().getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CPlugin getDefault() {
|
public static CUIPlugin getDefault() {
|
||||||
return fgCPlugin;
|
return fgCPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(Throwable e) {
|
public static void log(Throwable e) {
|
||||||
log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e));
|
log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(IStatus status) {
|
public static void log(IStatus status) {
|
||||||
getDefault().getLog().log(status);
|
getDefault().getLog().log(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------ CPlugin
|
// ------ CUIPlugin
|
||||||
|
|
||||||
private ConsoleDocument fConsoleDocument;
|
|
||||||
private CoreModel fCoreModel;
|
private CoreModel fCoreModel;
|
||||||
private CDocumentProvider fDocumentProvider;
|
private CDocumentProvider fDocumentProvider;
|
||||||
private CTextTools fTextTools;
|
private CTextTools fTextTools;
|
||||||
private AsmTextTools fAsmTextTools;
|
private AsmTextTools fAsmTextTools;
|
||||||
private ProblemMarkerManager fProblemMarkerManager;
|
private ProblemMarkerManager fProblemMarkerManager;
|
||||||
|
private BuildConsoleManager fBuildConsoleManager;
|
||||||
|
|
||||||
static class ConsoleDocument extends ConsoleOutputStream implements IConsole {
|
|
||||||
protected IDocument fDocument;
|
|
||||||
|
|
||||||
public ConsoleDocument() {
|
|
||||||
fDocument = new Document();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start(IProject project) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clear() {
|
|
||||||
super.clear();
|
|
||||||
Display.getDefault().syncExec(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
fDocument.set("");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConsoleOutputStream getOutputStream() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IDocument getDocument() {
|
public CUIPlugin(IPluginDescriptor descriptor) {
|
||||||
return fDocument;
|
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized void flush() throws IOException {
|
|
||||||
super.flush();
|
|
||||||
Display.getDefault().asyncExec(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
if (CPluginPreferencePage.isConsoleOnTop())
|
|
||||||
bringConsoleOnTop();
|
|
||||||
try {
|
|
||||||
int len = fDocument.getLength ();
|
|
||||||
fDocument.replace(len, 0, readBuffer());
|
|
||||||
} catch (BadLocationException x) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void bringConsoleOnTop () {
|
|
||||||
IWorkbenchWindow window = getActiveWorkbenchWindow();
|
|
||||||
if ( window == null )
|
|
||||||
return;
|
|
||||||
IWorkbenchPage page = window.getActivePage();
|
|
||||||
if (page != null) {
|
|
||||||
try {
|
|
||||||
// show the build console
|
|
||||||
IViewPart cBuild = page.findView(CPlugin.CONSOLE_ID);
|
|
||||||
if(cBuild == null) {
|
|
||||||
if(CPluginPreferencePage.isAutoOpenConsole()) {
|
|
||||||
IWorkbenchPart activePart = page.getActivePart();
|
|
||||||
cBuild = page.showView(CPlugin.CONSOLE_ID);
|
|
||||||
//restore focus
|
|
||||||
page.activate(activePart);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
page.bringToTop(cBuild);
|
|
||||||
}
|
|
||||||
} catch (PartInitException pie) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CPlugin(IPluginDescriptor descriptor) {
|
|
||||||
super(descriptor);
|
super(descriptor);
|
||||||
fgCPlugin= this;
|
fgCPlugin = this;
|
||||||
fConsoleDocument= new ConsoleDocument();
|
fDocumentProvider = null;
|
||||||
fDocumentProvider= null;
|
fTextTools = null;
|
||||||
fTextTools= null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the used document provider
|
* Returns the used document provider
|
||||||
*/
|
*/
|
||||||
public CDocumentProvider getDocumentProvider() {
|
public CDocumentProvider getDocumentProvider() {
|
||||||
if (fDocumentProvider == null) {
|
if (fDocumentProvider == null) {
|
||||||
fDocumentProvider= new CDocumentProvider();
|
fDocumentProvider = new CDocumentProvider();
|
||||||
}
|
}
|
||||||
return fDocumentProvider;
|
return fDocumentProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the shared text tools
|
* Returns the shared text tools
|
||||||
*/
|
*/
|
||||||
public CTextTools getTextTools() {
|
public CTextTools getTextTools() {
|
||||||
if (fTextTools == null)
|
if (fTextTools == null)
|
||||||
fTextTools= new CTextTools();
|
fTextTools = new CTextTools();
|
||||||
return fTextTools;
|
return fTextTools;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the shared assembly text tools
|
* Returns the shared assembly text tools
|
||||||
*/
|
*/
|
||||||
public AsmTextTools getAsmTextTools() {
|
public AsmTextTools getAsmTextTools() {
|
||||||
if (fAsmTextTools == null)
|
if (fAsmTextTools == null)
|
||||||
fAsmTextTools= new AsmTextTools();
|
fAsmTextTools = new AsmTextTools();
|
||||||
return fAsmTextTools;
|
return fAsmTextTools;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IBuildConsoleManager getConsoleManager() {
|
||||||
|
if ( fBuildConsoleManager == null ) {
|
||||||
|
fBuildConsoleManager = new BuildConsoleManager();
|
||||||
|
fBuildConsoleManager.startup();
|
||||||
|
}
|
||||||
|
return fBuildConsoleManager;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Plugin#shutdown
|
* @see Plugin#shutdown
|
||||||
*/
|
*/
|
||||||
|
@ -247,18 +184,21 @@ public class CPlugin extends AbstractUIPlugin {
|
||||||
}
|
}
|
||||||
if (fImageDescriptorRegistry != null)
|
if (fImageDescriptorRegistry != null)
|
||||||
fImageDescriptorRegistry.dispose();
|
fImageDescriptorRegistry.dispose();
|
||||||
|
fBuildConsoleManager.shutdown();
|
||||||
|
fBuildConsoleManager = null;
|
||||||
super.shutdown();
|
super.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void runUI(Runnable run) {
|
private void runUI(Runnable run) {
|
||||||
Display display;
|
Display display;
|
||||||
display= Display.getCurrent();
|
display = Display.getCurrent();
|
||||||
if (display == null) {
|
if (display == null) {
|
||||||
display= Display.getDefault();
|
display = Display.getDefault();
|
||||||
display.asyncExec(run);
|
display.asyncExec(run);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
run.run();
|
run.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -266,16 +206,16 @@ public class CPlugin extends AbstractUIPlugin {
|
||||||
*/
|
*/
|
||||||
public void startup() throws CoreException {
|
public void startup() throws CoreException {
|
||||||
super.startup();
|
super.startup();
|
||||||
IAdapterManager manager= Platform.getAdapterManager();
|
IAdapterManager manager = Platform.getAdapterManager();
|
||||||
manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
|
manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
|
||||||
manager.registerAdapters(new CElementAdapterFactory(), ICElement.class);
|
manager.registerAdapters(new CElementAdapterFactory(), ICElement.class);
|
||||||
runUI(new Runnable() {
|
runUI(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
CPluginImages.initialize();
|
CPluginImages.initialize();
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AbstractUIPlugin#initializeDefaultPreferences
|
* @see AbstractUIPlugin#initializeDefaultPreferences
|
||||||
*/
|
*/
|
||||||
|
@ -283,45 +223,37 @@ public class CPlugin extends AbstractUIPlugin {
|
||||||
super.initializeDefaultPreferences(store);
|
super.initializeDefaultPreferences(store);
|
||||||
runUI(new Runnable() {
|
runUI(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
CPluginPreferencePage.initDefaults(store);
|
CPluginPreferencePage.initDefaults(store);
|
||||||
CEditorPreferencePage.initDefaults(store);
|
CEditorPreferencePage.initDefaults(store);
|
||||||
CView.initDefaults(store);
|
CView.initDefaults(store);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public IConsole getConsole() {
|
|
||||||
return fConsoleDocument;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IDocument getConsoleDocument() {
|
|
||||||
return fConsoleDocument.getDocument();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CoreModel getCoreModel() {
|
public CoreModel getCoreModel() {
|
||||||
return fCoreModel;
|
return fCoreModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPluginId() {
|
public static String getPluginId() {
|
||||||
return PLUGIN_ID;
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ImageDescriptorRegistry getImageDescriptorRegistry() {
|
public static ImageDescriptorRegistry getImageDescriptorRegistry() {
|
||||||
return getDefault().internalGetImageDescriptorRegistry();
|
return getDefault().internalGetImageDescriptorRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ImageDescriptorRegistry internalGetImageDescriptorRegistry() {
|
private ImageDescriptorRegistry internalGetImageDescriptorRegistry() {
|
||||||
if (fImageDescriptorRegistry == null)
|
if (fImageDescriptorRegistry == null)
|
||||||
fImageDescriptorRegistry= new ImageDescriptorRegistry();
|
fImageDescriptorRegistry = new ImageDescriptorRegistry();
|
||||||
return fImageDescriptorRegistry;
|
return fImageDescriptorRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the problem marker manager
|
* Returns the problem marker manager
|
||||||
*/
|
*/
|
||||||
public ProblemMarkerManager getProblemMarkerManager() {
|
public ProblemMarkerManager getProblemMarkerManager() {
|
||||||
if (fProblemMarkerManager == null)
|
if (fProblemMarkerManager == null)
|
||||||
fProblemMarkerManager= new ProblemMarkerManager();
|
fProblemMarkerManager = new ProblemMarkerManager();
|
||||||
return fProblemMarkerManager;
|
return fProblemMarkerManager;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package org.eclipse.cdt.ui;
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software System Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
|
||||||
|
public interface IBuildConsoleEvent {
|
||||||
|
final static int CONSOLE_START = 1;
|
||||||
|
|
||||||
|
IProject getProject();
|
||||||
|
int getType();
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software System Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/package org.eclipse.cdt.ui;
|
||||||
|
|
||||||
|
public interface IBuildConsoleListener {
|
||||||
|
void consoleChange(IBuildConsoleEvent event);
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software System Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.ui;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
|
public interface IBuildConsoleManager {
|
||||||
|
IConsole getConsole(IProject project);
|
||||||
|
IDocument getConsoleDocument(IProject project);
|
||||||
|
void addConsoleListener(IBuildConsoleListener listener);
|
||||||
|
void removeConsoleListener(IBuildConsoleListener listener);
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ package org.eclipse.cdt.ui.wizards;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
|
@ -31,24 +31,24 @@ public abstract class CCProjectWizard extends CProjectWizard {
|
||||||
|
|
||||||
public CCProjectWizard() {
|
public CCProjectWizard() {
|
||||||
super();
|
super();
|
||||||
setDialogSettings(CPlugin.getDefault().getDialogSettings());
|
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
||||||
wz_title = CPlugin.getResourceString(WZ_TITLE);
|
wz_title = CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
wz_desc = CPlugin.getResourceString(WZ_DESC);
|
wz_desc = CUIPlugin.getResourceString(WZ_DESC);
|
||||||
op_error = CPlugin.getResourceString(OP_ERROR);
|
op_error = CUIPlugin.getResourceString(OP_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CCProjectWizard(String title, String description) {
|
public CCProjectWizard(String title, String description) {
|
||||||
super();
|
super();
|
||||||
setDialogSettings(CPlugin.getDefault().getDialogSettings());
|
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
||||||
wz_title = title;
|
wz_title = title;
|
||||||
wz_desc = description;
|
wz_desc = description;
|
||||||
op_error = CPlugin.getResourceString(OP_ERROR);
|
op_error = CUIPlugin.getResourceString(OP_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public CCProjectWizard(String title, String description, String error) {
|
public CCProjectWizard(String title, String description, String error) {
|
||||||
super();
|
super();
|
||||||
setDialogSettings(CPlugin.getDefault().getDialogSettings());
|
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
||||||
wz_title = title;
|
wz_title = title;
|
||||||
wz_desc = description;
|
wz_desc = description;
|
||||||
op_error = error;
|
op_error = error;
|
||||||
|
|
|
@ -39,8 +39,8 @@ import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
|
||||||
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
|
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,17 +71,17 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
List tabItemsList = new ArrayList();
|
List tabItemsList = new ArrayList();
|
||||||
|
|
||||||
public CProjectWizard() {
|
public CProjectWizard() {
|
||||||
this(CPlugin.getResourceString(WZ_TITLE), CPlugin.getResourceString(WZ_DESC),
|
this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC),
|
||||||
CPlugin.getResourceString(OP_ERROR));
|
CUIPlugin.getResourceString(OP_ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CProjectWizard(String title, String description) {
|
public CProjectWizard(String title, String description) {
|
||||||
this(title, description, CPlugin.getResourceString(OP_ERROR));
|
this(title, description, CUIPlugin.getResourceString(OP_ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CProjectWizard(String title, String description, String error) {
|
public CProjectWizard(String title, String description, String error) {
|
||||||
super();
|
super();
|
||||||
setDialogSettings(CPlugin.getDefault().getDialogSettings());
|
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
||||||
setNeedsProgressMonitor(true);
|
setNeedsProgressMonitor(true);
|
||||||
wz_title = title;
|
wz_title = title;
|
||||||
wz_desc = description;
|
wz_desc = description;
|
||||||
|
@ -92,7 +92,7 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
* @see Wizard#createPages
|
* @see Wizard#createPages
|
||||||
*/
|
*/
|
||||||
public void addPages() {
|
public void addPages() {
|
||||||
fMainPage= new CProjectWizardPage(CPlugin.getResourceString(PREFIX));
|
fMainPage= new CProjectWizardPage(CUIPlugin.getResourceString(PREFIX));
|
||||||
fMainPage.setTitle(wz_title);
|
fMainPage.setTitle(wz_title);
|
||||||
fMainPage.setDescription(wz_desc);
|
fMainPage.setDescription(wz_desc);
|
||||||
addPage(fMainPage);
|
addPage(fMainPage);
|
||||||
|
@ -171,7 +171,7 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
page.openEditor(file);
|
page.openEditor(file);
|
||||||
} catch (PartInitException e) {
|
} catch (PartInitException e) {
|
||||||
MessageDialog.openError(dw.getShell(),
|
MessageDialog.openError(dw.getShell(),
|
||||||
CPlugin.getResourceString(OP_ERROR), e.getMessage());
|
CUIPlugin.getResourceString(OP_ERROR), e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
*/
|
*/
|
||||||
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
|
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
|
||||||
super.init(workbench, currentSelection);
|
super.init(workbench, currentSelection);
|
||||||
setWindowTitle(CPlugin.getResourceString(WINDOW_TITLE));
|
setWindowTitle(CUIPlugin.getResourceString(WINDOW_TITLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IRunnableWithProgress getRunnable() {
|
public IRunnableWithProgress getRunnable() {
|
||||||
|
@ -209,7 +209,7 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor= new NullProgressMonitor();
|
monitor= new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
monitor.beginTask(CPlugin.getResourceString(OP_DESC), 3);
|
monitor.beginTask(CUIPlugin.getResourceString(OP_DESC), 3);
|
||||||
|
|
||||||
doRunPrologue(new SubProgressMonitor(monitor, 1));
|
doRunPrologue(new SubProgressMonitor(monitor, 1));
|
||||||
try {
|
try {
|
||||||
|
@ -234,20 +234,20 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
getContainer().run(false, true, op);
|
getContainer().run(false, true, op);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
Shell shell= getShell();
|
Shell shell= getShell();
|
||||||
String title= CPlugin.getResourceString(OP_ERROR + ".title"); //$NON-NLS-1$
|
String title= CUIPlugin.getResourceString(OP_ERROR + ".title"); //$NON-NLS-1$
|
||||||
String message= CPlugin.getResourceString(OP_ERROR + ".message"); //$NON-NLS-1$
|
String message= CUIPlugin.getResourceString(OP_ERROR + ".message"); //$NON-NLS-1$
|
||||||
|
|
||||||
Throwable th= e.getTargetException();
|
Throwable th= e.getTargetException();
|
||||||
if (th instanceof CoreException) {
|
if (th instanceof CoreException) {
|
||||||
IStatus status= ((CoreException)th).getStatus();
|
IStatus status= ((CoreException)th).getStatus();
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
ErrorDialog.openError(shell, title, message, status);
|
ErrorDialog.openError(shell, title, message, status);
|
||||||
CPlugin.log(status);
|
CUIPlugin.log(status);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MessageDialog.openError(shell, title, message);
|
MessageDialog.openError(shell, title, message);
|
||||||
CPlugin.log(th);
|
CUIPlugin.log(th);
|
||||||
try {
|
try {
|
||||||
getProjectHandle().delete(false, false, null);
|
getProjectHandle().delete(false, false, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ package org.eclipse.cdt.ui.wizards;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
|
@ -114,7 +114,7 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT);
|
final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT);
|
||||||
useDefaultsButton.setText(CPlugin.getResourceString("CProjectWizardPage.useDefaultLabel")); //$NON-NLS-1$
|
useDefaultsButton.setText(CUIPlugin.getResourceString("CProjectWizardPage.useDefaultLabel")); //$NON-NLS-1$
|
||||||
useDefaultsButton.setSelection(this.useDefaults);
|
useDefaultsButton.setSelection(this.useDefaults);
|
||||||
|
|
||||||
GridData buttonData = new GridData();
|
GridData buttonData = new GridData();
|
||||||
|
@ -152,7 +152,7 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
|
|
||||||
// new project label
|
// new project label
|
||||||
Label projectLabel = new Label(projectGroup,SWT.NONE);
|
Label projectLabel = new Label(projectGroup,SWT.NONE);
|
||||||
projectLabel.setText(CPlugin.getResourceString("CProjectWizardPage.nameLabel")); //$NON-NLS-1$
|
projectLabel.setText(CUIPlugin.getResourceString("CProjectWizardPage.nameLabel")); //$NON-NLS-1$
|
||||||
|
|
||||||
// new project name entry field
|
// new project name entry field
|
||||||
projectNameField = new Text(projectGroup, SWT.BORDER);
|
projectNameField = new Text(projectGroup, SWT.BORDER);
|
||||||
|
@ -178,7 +178,7 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
|
|
||||||
// location label
|
// location label
|
||||||
locationLabel = new Label(projectGroup,SWT.NONE);
|
locationLabel = new Label(projectGroup,SWT.NONE);
|
||||||
locationLabel.setText(CPlugin.getResourceString("CProjectWizardPage.locationLabel")); //$NON-NLS-1$
|
locationLabel.setText(CUIPlugin.getResourceString("CProjectWizardPage.locationLabel")); //$NON-NLS-1$
|
||||||
locationLabel.setEnabled(enabled);
|
locationLabel.setEnabled(enabled);
|
||||||
|
|
||||||
// project location entry field
|
// project location entry field
|
||||||
|
@ -190,7 +190,7 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
|
|
||||||
// browse button
|
// browse button
|
||||||
browseButton = new Button(projectGroup, SWT.PUSH);
|
browseButton = new Button(projectGroup, SWT.PUSH);
|
||||||
browseButton.setText(CPlugin.getResourceString("CProjectWizardPage.browseLabel")); //$NON-NLS-1$
|
browseButton.setText(CUIPlugin.getResourceString("CProjectWizardPage.browseLabel")); //$NON-NLS-1$
|
||||||
browseButton.addSelectionListener(new SelectionAdapter() {
|
browseButton.addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
handleLocationBrowseButtonPressed();
|
handleLocationBrowseButtonPressed();
|
||||||
|
@ -252,7 +252,7 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
*/
|
*/
|
||||||
protected void handleLocationBrowseButtonPressed() {
|
protected void handleLocationBrowseButtonPressed() {
|
||||||
DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
|
DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
|
||||||
dialog.setMessage(CPlugin.getResourceString("CProjectWizardPage.directoryLabel")); //$NON-NLS-1$
|
dialog.setMessage(CUIPlugin.getResourceString("CProjectWizardPage.directoryLabel")); //$NON-NLS-1$
|
||||||
|
|
||||||
String dirName = locationPathField.getText();
|
String dirName = locationPathField.getText();
|
||||||
if (!dirName.equals("")) {//$NON-NLS-1$
|
if (!dirName.equals("")) {//$NON-NLS-1$
|
||||||
|
@ -300,12 +300,12 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
String projectFieldContents = projectNameField.getText();
|
String projectFieldContents = projectNameField.getText();
|
||||||
if (projectFieldContents.equals("")) { //$NON-NLS-1$
|
if (projectFieldContents.equals("")) { //$NON-NLS-1$
|
||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
setMessage(CPlugin.getResourceString("CProjectWizardPage.projectNameEmpty")); //$NON-NLS-1$
|
setMessage(CUIPlugin.getResourceString("CProjectWizardPage.projectNameEmpty")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (projectFieldContents.indexOf(' ') != -1) {
|
if (projectFieldContents.indexOf(' ') != -1) {
|
||||||
setErrorMessage(CPlugin.getResourceString("CProjectWizardPage.projectContainsSpace")); //$NON-NLS-1$
|
setErrorMessage(CUIPlugin.getResourceString("CProjectWizardPage.projectContainsSpace")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,17 +321,17 @@ public class CProjectWizardPage extends WizardPage {
|
||||||
if (!locationFieldContents.equals("")) {//$NON-NLS-1$
|
if (!locationFieldContents.equals("")) {//$NON-NLS-1$
|
||||||
IPath path = new Path("");//$NON-NLS-1$
|
IPath path = new Path("");//$NON-NLS-1$
|
||||||
if (!path.isValidPath(locationFieldContents)) {
|
if (!path.isValidPath(locationFieldContents)) {
|
||||||
setErrorMessage(CPlugin.getResourceString("CProjectWizardPage.locationError")); //$NON-NLS-1$
|
setErrorMessage(CUIPlugin.getResourceString("CProjectWizardPage.locationError")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!useDefaults && Platform.getLocation().isPrefixOf(new Path(locationFieldContents))) {
|
if (!useDefaults && Platform.getLocation().isPrefixOf(new Path(locationFieldContents))) {
|
||||||
setErrorMessage(CPlugin.getResourceString("CProjectWizardPage.defaultLocationError")); //$NON-NLS-1$
|
setErrorMessage(CUIPlugin.getResourceString("CProjectWizardPage.defaultLocationError")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getProjectHandle().exists()) {
|
if (getProjectHandle().exists()) {
|
||||||
setErrorMessage(CPlugin.getResourceString("CProjectWizardPage.projectExistsMessage")); //$NON-NLS-1$
|
setErrorMessage(CUIPlugin.getResourceString("CProjectWizardPage.projectExistsMessage")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.eclipse.ui.model.WorkbenchContentProvider;
|
||||||
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class ReferenceBlock implements IWizardTab {
|
||||||
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
Label label = new Label(composite, SWT.LEFT);
|
Label label = new Label(composite, SWT.LEFT);
|
||||||
label.setText(CPlugin.getResourceString(DESC));
|
label.setText(CUIPlugin.getResourceString(DESC));
|
||||||
GridData lbldata = new GridData(GridData.FILL_HORIZONTAL);
|
GridData lbldata = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
lbldata.horizontalSpan = 1;
|
lbldata.horizontalSpan = 1;
|
||||||
label.setLayoutData(lbldata);
|
label.setLayoutData(lbldata);
|
||||||
|
@ -77,7 +77,7 @@ public class ReferenceBlock implements IWizardTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabel() {
|
public String getLabel() {
|
||||||
return CPlugin.getResourceString(LABEL);
|
return CUIPlugin.getResourceString(LABEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,8 +27,8 @@ import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CProjectNature;
|
import org.eclipse.cdt.core.CProjectNature;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
import org.eclipse.cdt.utils.ui.swt.IValidation;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
import org.eclipse.cdt.utils.ui.controls.RadioButtonsArea;
|
import org.eclipse.cdt.utils.ui.controls.RadioButtonsArea;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public class SettingsBlock implements IWizardTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabel() {
|
public String getLabel() {
|
||||||
return CPlugin.getResourceString(LABEL);
|
return CUIPlugin.getResourceString(LABEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image getImage() {
|
public Image getImage() {
|
||||||
|
@ -101,21 +101,21 @@ public class SettingsBlock implements IWizardTab {
|
||||||
Composite composite = ControlFactory.createComposite(parent, 1);
|
Composite composite = ControlFactory.createComposite(parent, 1);
|
||||||
|
|
||||||
String[][] radios =
|
String[][] radios =
|
||||||
new String[][] { { CPlugin.getResourceString(STOP_ERROR), STOP_ARG }, {
|
new String[][] { { CUIPlugin.getResourceString(STOP_ERROR), STOP_ARG }, {
|
||||||
CPlugin.getResourceString(KEEP_GOING), KEEP_ARG }
|
CUIPlugin.getResourceString(KEEP_GOING), KEEP_ARG }
|
||||||
};
|
};
|
||||||
radioButtons =
|
radioButtons =
|
||||||
new RadioButtonsArea(composite, CPlugin.getResourceString(LABEL), 1, radios);
|
new RadioButtonsArea(composite, CUIPlugin.getResourceString(LABEL), 1, radios);
|
||||||
|
|
||||||
Group mgroup =
|
Group mgroup =
|
||||||
ControlFactory.createGroup(
|
ControlFactory.createGroup(
|
||||||
composite,
|
composite,
|
||||||
CPlugin.getResourceString(MAKE_OPTION),
|
CUIPlugin.getResourceString(MAKE_OPTION),
|
||||||
1);
|
1);
|
||||||
defButton =
|
defButton =
|
||||||
ControlFactory.createCheckBox(
|
ControlFactory.createCheckBox(
|
||||||
mgroup,
|
mgroup,
|
||||||
CPlugin.getResourceString(MAKE_USE_DEFAULT));
|
CUIPlugin.getResourceString(MAKE_USE_DEFAULT));
|
||||||
defButton.addSelectionListener(new SelectionAdapter() {
|
defButton.addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
if (defButton.getSelection() == true) {
|
if (defButton.getSelection() == true) {
|
||||||
|
@ -142,7 +142,7 @@ public class SettingsBlock implements IWizardTab {
|
||||||
cmdComp.setLayout(layout);
|
cmdComp.setLayout(layout);
|
||||||
cmdComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
cmdComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
Label label =
|
Label label =
|
||||||
ControlFactory.createLabel(cmdComp, CPlugin.getResourceString(MAKE_BUILD_CMD));
|
ControlFactory.createLabel(cmdComp, CUIPlugin.getResourceString(MAKE_BUILD_CMD));
|
||||||
((GridData) (label.getLayoutData())).horizontalAlignment = GridData.BEGINNING;
|
((GridData) (label.getLayoutData())).horizontalAlignment = GridData.BEGINNING;
|
||||||
((GridData) (label.getLayoutData())).grabExcessHorizontalSpace = false;
|
((GridData) (label.getLayoutData())).grabExcessHorizontalSpace = false;
|
||||||
cmdText = ControlFactory.createTextField(cmdComp, SWT.SINGLE | SWT.BORDER);
|
cmdText = ControlFactory.createTextField(cmdComp, SWT.SINGLE | SWT.BORDER);
|
||||||
|
|
|
@ -6,7 +6,7 @@ package org.eclipse.cdt.ui.wizards;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
@ -22,7 +22,7 @@ public class StdCCWizard extends StdMakeProjectWizard {
|
||||||
private static final String SETTINGS_DESC= "StdCCWizardSettings.description"; //$NON-NLS-1$
|
private static final String SETTINGS_DESC= "StdCCWizardSettings.description"; //$NON-NLS-1$
|
||||||
|
|
||||||
public StdCCWizard() {
|
public StdCCWizard() {
|
||||||
this(CPlugin.getResourceString(WZ_TITLE), CPlugin.getResourceString(WZ_DESC));
|
this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StdCCWizard(String title, String desc) {
|
public StdCCWizard(String title, String desc) {
|
||||||
|
@ -31,8 +31,8 @@ public class StdCCWizard extends StdMakeProjectWizard {
|
||||||
|
|
||||||
public void addTabItems(TabFolder folder) {
|
public void addTabItems(TabFolder folder) {
|
||||||
super.addTabItems(folder);
|
super.addTabItems(folder);
|
||||||
fTabFolderPage.setTitle(CPlugin.getResourceString(SETTINGS_TITLE));
|
fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE));
|
||||||
fTabFolderPage.setDescription(CPlugin.getResourceString(SETTINGS_DESC));
|
fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC));
|
||||||
}
|
}
|
||||||
protected void doRun(IProgressMonitor monitor) throws CoreException {
|
protected void doRun(IProgressMonitor monitor) throws CoreException {
|
||||||
super.doRun(monitor);
|
super.doRun(monitor);
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.ui.wizards;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.swt.widgets.TabFolder;
|
import org.eclipse.swt.widgets.TabFolder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,7 +18,7 @@ public class StdCWizard extends StdMakeProjectWizard {
|
||||||
private static final String SETTINGS_DESC= "StdCWizardSettings.description"; //$NON-NLS-1$
|
private static final String SETTINGS_DESC= "StdCWizardSettings.description"; //$NON-NLS-1$
|
||||||
|
|
||||||
public StdCWizard() {
|
public StdCWizard() {
|
||||||
this(CPlugin.getResourceString(WZ_TITLE), CPlugin.getResourceString(WZ_DESC));
|
this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StdCWizard(String title, String desc) {
|
public StdCWizard(String title, String desc) {
|
||||||
|
@ -27,7 +27,7 @@ public class StdCWizard extends StdMakeProjectWizard {
|
||||||
|
|
||||||
public void addTabItems(TabFolder folder) {
|
public void addTabItems(TabFolder folder) {
|
||||||
super.addTabItems(folder);
|
super.addTabItems(folder);
|
||||||
fTabFolderPage.setTitle(CPlugin.getResourceString(SETTINGS_TITLE));
|
fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE));
|
||||||
fTabFolderPage.setDescription(CPlugin.getResourceString(SETTINGS_DESC));
|
fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ package org.eclipse.cdt.ui.wizards;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
@ -31,7 +31,7 @@ public abstract class StdMakeProjectWizard extends CProjectWizard {
|
||||||
private SettingsBlock settingsBlock;
|
private SettingsBlock settingsBlock;
|
||||||
|
|
||||||
public StdMakeProjectWizard() {
|
public StdMakeProjectWizard() {
|
||||||
this(CPlugin.getResourceString(WZ_TITLE), CPlugin.getResourceString(WZ_DESC));
|
this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StdMakeProjectWizard(String title, String desc) {
|
public StdMakeProjectWizard(String title, String desc) {
|
||||||
|
@ -39,8 +39,8 @@ public abstract class StdMakeProjectWizard extends CProjectWizard {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTabItems(TabFolder folder) {
|
public void addTabItems(TabFolder folder) {
|
||||||
fTabFolderPage.setTitle(CPlugin.getResourceString(SETTINGS_TITLE));
|
fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE));
|
||||||
fTabFolderPage.setDescription(CPlugin.getResourceString(SETTINGS_DESC));
|
fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC));
|
||||||
|
|
||||||
referenceBlock = new ReferenceBlock(getValidation());
|
referenceBlock = new ReferenceBlock(getValidation());
|
||||||
TabItem item = new TabItem(folder, SWT.NONE);
|
TabItem item = new TabItem(folder, SWT.NONE);
|
||||||
|
|
|
@ -6,7 +6,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.wizards.CProjectWizard;
|
import org.eclipse.cdt.ui.wizards.CProjectWizard;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -73,7 +73,7 @@ public abstract class ConversionWizard
|
||||||
*/
|
*/
|
||||||
protected static String getWindowTitleResource() {
|
protected static String getWindowTitleResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WINDOW_TITLE);
|
return CUIPlugin.getResourceString(WINDOW_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +84,7 @@ public abstract class ConversionWizard
|
||||||
*/
|
*/
|
||||||
protected static String getWzDescriptionResource() {
|
protected static String getWzDescriptionResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +95,7 @@ public abstract class ConversionWizard
|
||||||
*/
|
*/
|
||||||
protected static String getWzTitleResource() {
|
protected static String getWzTitleResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
import org.eclipse.cdt.core.CCProjectNature;
|
import org.eclipse.cdt.core.CCProjectNature;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.CProjectNature;
|
import org.eclipse.cdt.core.CProjectNature;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -48,7 +48,7 @@ public class ConvertCtoCCStdMakeProjectWizardPage extends ConvertProjectWizardPa
|
||||||
* overriding the default in the superclass.
|
* overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzTitleResource(){
|
protected String getWzTitleResource(){
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,7 +56,7 @@ public class ConvertCtoCCStdMakeProjectWizardPage extends ConvertProjectWizardPa
|
||||||
* Label for this class overriding the default in the superclass.
|
* Label for this class overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzDescriptionResource(){
|
protected String getWzDescriptionResource(){
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +72,7 @@ public class ConvertCtoCCStdMakeProjectWizardPage extends ConvertProjectWizardPa
|
||||||
&& !project.hasNature(CCProjectNature.CC_NATURE_ID))
|
&& !project.hasNature(CCProjectNature.CC_NATURE_ID))
|
||||||
return true;
|
return true;
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
*/
|
*/
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
|
||||||
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
|
@ -143,7 +143,7 @@ public abstract class ConvertProjectWizardPage
|
||||||
|
|
||||||
// Add a label
|
// Add a label
|
||||||
Label label = new Label(parent, SWT.LEFT);
|
Label label = new Label(parent, SWT.LEFT);
|
||||||
label.setText(CPlugin.getResourceString(PROJECT_LIST));
|
label.setText(CUIPlugin.getResourceString(PROJECT_LIST));
|
||||||
|
|
||||||
Composite container = new Composite(parent, SWT.NONE);
|
Composite container = new Composite(parent, SWT.NONE);
|
||||||
GridLayout layout = new GridLayout();
|
GridLayout layout = new GridLayout();
|
||||||
|
@ -345,7 +345,7 @@ public abstract class ConvertProjectWizardPage
|
||||||
*/
|
*/
|
||||||
protected Object[] getElements() {
|
protected Object[] getElements() {
|
||||||
|
|
||||||
IWorkspace workspace = CPlugin.getWorkspace();
|
IWorkspace workspace = CUIPlugin.getWorkspace();
|
||||||
IProject[] projects = workspace.getRoot().getProjects();
|
IProject[] projects = workspace.getRoot().getProjects();
|
||||||
Vector candidates = new Vector(projects.length);
|
Vector candidates = new Vector(projects.length);
|
||||||
IProject next = null;
|
IProject next = null;
|
||||||
|
@ -395,7 +395,7 @@ public abstract class ConvertProjectWizardPage
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
monitor.beginTask(CPlugin.getResourceString(KEY_TITLE), 1);
|
monitor.beginTask(CUIPlugin.getResourceString(KEY_TITLE), 1);
|
||||||
convertProjects(selection, monitor, projectID);
|
convertProjects(selection, monitor, projectID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ public abstract class ConvertProjectWizardPage
|
||||||
*/
|
*/
|
||||||
private void convertProjects(Object[] selected, IProgressMonitor monitor, String projectID)
|
private void convertProjects(Object[] selected, IProgressMonitor monitor, String projectID)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
monitor.beginTask(CPlugin.getResourceString(KEY_CONVERTING),
|
monitor.beginTask(CUIPlugin.getResourceString(KEY_CONVERTING),
|
||||||
selected.length);
|
selected.length);
|
||||||
|
|
||||||
for (int i = 0; i < selected.length; i++) {
|
for (int i = 0; i < selected.length; i++) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCProjectNature;
|
import org.eclipse.cdt.core.CCProjectNature;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -47,7 +47,7 @@ public class ConvertSimpleToCCStdMakeProjectWizardPage extends ConvertSimpleToCS
|
||||||
* overriding the default in the superclass.
|
* overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzTitleResource(){
|
protected String getWzTitleResource(){
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,7 +55,7 @@ public class ConvertSimpleToCCStdMakeProjectWizardPage extends ConvertSimpleToCS
|
||||||
* Label for this class overriding the default in the superclass.
|
* Label for this class overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzDescriptionResource(){
|
protected String getWzDescriptionResource(){
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.CProjectNature;
|
import org.eclipse.cdt.core.CProjectNature;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -47,7 +47,7 @@ public class ConvertSimpleToCStdMakeProjectWizardPage extends ConvertProjectWiza
|
||||||
* overriding the default in the superclass.
|
* overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzTitleResource(){
|
protected String getWzTitleResource(){
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,7 +55,7 @@ public class ConvertSimpleToCStdMakeProjectWizardPage extends ConvertProjectWiza
|
||||||
* Label for this class overriding the default in the superclass.
|
* Label for this class overriding the default in the superclass.
|
||||||
*/
|
*/
|
||||||
protected String getWzDescriptionResource(){
|
protected String getWzDescriptionResource(){
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This wizard provides a method by which the user can
|
* This wizard provides a method by which the user can
|
||||||
|
@ -42,7 +42,7 @@ public class CtoCCConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzDescriptionResource() {
|
protected static String getWzDescriptionResource() {
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +52,7 @@ public class CtoCCConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzTitleResource() {
|
protected static String getWzTitleResource() {
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ public class CtoCCConversionWizard extends ConversionWizard {
|
||||||
*/
|
*/
|
||||||
protected static String getWindowTitleResource() {
|
protected static String getWindowTitleResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WINDOW_TITLE);
|
return CUIPlugin.getResourceString(WINDOW_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This wizard provides a method by which the user can
|
* This wizard provides a method by which the user can
|
||||||
|
@ -42,7 +42,7 @@ public class SimpleToCCStdMakeConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzDescriptionResource() {
|
protected static String getWzDescriptionResource() {
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +52,7 @@ public class SimpleToCCStdMakeConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzTitleResource() {
|
protected static String getWzTitleResource() {
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ public class SimpleToCCStdMakeConversionWizard extends ConversionWizard {
|
||||||
*/
|
*/
|
||||||
protected static String getWindowTitleResource() {
|
protected static String getWindowTitleResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WINDOW_TITLE);
|
return CUIPlugin.getResourceString(WINDOW_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.eclipse.cdt.ui.wizards.conversion;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This wizard provides a method by which the user can
|
* This wizard provides a method by which the user can
|
||||||
|
@ -42,7 +42,7 @@ public class SimpleToCStdMakeConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzDescriptionResource() {
|
protected static String getWzDescriptionResource() {
|
||||||
return CPlugin.getResourceString(WZ_DESC);
|
return CUIPlugin.getResourceString(WZ_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +52,7 @@ public class SimpleToCStdMakeConversionWizard extends ConversionWizard {
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
protected static String getWzTitleResource() {
|
protected static String getWzTitleResource() {
|
||||||
return CPlugin.getResourceString(WZ_TITLE);
|
return CUIPlugin.getResourceString(WZ_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ public class SimpleToCStdMakeConversionWizard extends ConversionWizard {
|
||||||
*/
|
*/
|
||||||
protected static String getWindowTitleResource() {
|
protected static String getWindowTitleResource() {
|
||||||
|
|
||||||
return CPlugin.getResourceString(WINDOW_TITLE);
|
return CUIPlugin.getResourceString(WINDOW_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue