mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Cleanup of the warning from eclipse 2.1 compiler
static vs non-static access of fields and method.
This commit is contained in:
parent
02cb4b545e
commit
a959342b9a
35 changed files with 70 additions and 69 deletions
|
@ -49,7 +49,7 @@ public class Templates extends TemplateSet {
|
|||
}
|
||||
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
ErrorDialog.openError(null,
|
||||
TemplateMessages.getString("Templates.error.title"), //$NON-NLS-1$
|
||||
e.getMessage(), e.getStatus());
|
||||
|
|
|
@ -136,7 +136,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
|
|||
}
|
||||
|
||||
void bringConsoleOnTop() {
|
||||
IWorkbenchWindow window = CUIPlugin.getActiveWorkbenchWindow();
|
||||
IWorkbenchWindow window = CUIPlugin.getDefault().getActiveWorkbenchWindow();
|
||||
if (window == null)
|
||||
return;
|
||||
IWorkbenchPage page = window.getActivePage();
|
||||
|
|
|
@ -41,7 +41,7 @@ public class CCompletionContributorManager {
|
|||
return fInstance;
|
||||
}
|
||||
|
||||
public static IFunctionSummary getFunctionInfo(String name) {
|
||||
public IFunctionSummary getFunctionInfo(String name) {
|
||||
if(!fContributorsLoaded)
|
||||
loadExtensions();
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class CCompletionContributorManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static IFunctionSummary[] getMatchingFunctions(String frag) {
|
||||
public IFunctionSummary[] getMatchingFunctions(String frag) {
|
||||
if(!fContributorsLoaded)
|
||||
loadExtensions();
|
||||
IFunctionSummary[] fs = null;
|
||||
|
@ -83,7 +83,7 @@ public class CCompletionContributorManager {
|
|||
return fs;
|
||||
}
|
||||
|
||||
static private void loadExtensions() {
|
||||
private void loadExtensions() {
|
||||
fContributorsLoaded = true;
|
||||
fCompletionContributors= new ArrayList(2);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class CPluginImages {
|
|||
try {
|
||||
fgIconBaseURL= new URL(CUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" );
|
||||
} catch (MalformedURLException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
}
|
||||
}
|
||||
private static final String NAME_PREFIX= CUIPlugin.PLUGIN_ID + '.';
|
||||
|
@ -155,7 +155,7 @@ public class CPluginImages {
|
|||
try {
|
||||
return new URL(fgIconBaseURL, buffer.toString());
|
||||
} catch (MalformedURLException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class ErrorTickAdornmentProvider implements IAdornmentProvider {
|
|||
return getErrorTicksFromMarkers((IResource) obj, IResource.DEPTH_INFINITE, null);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate {
|
|||
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "no Editor Input", null));
|
||||
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
}
|
||||
}
|
||||
return unit;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
try {
|
||||
fInput.update();
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
fInput= null;
|
||||
return;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
|
||||
treeViewer.setInput(fInput);
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
fInput= null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -657,7 +657,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener {
|
|||
|
||||
MenuManager search= new MenuManager("Search", IContextMenuConstants.GROUP_SEARCH); //$NON-NLS-1$
|
||||
menu.appendToGroup(ITextEditorActionConstants.GROUP_FIND, search);
|
||||
if(fSearchForReferencesAction.canActionBeAdded(getSelectionProvider().getSelection())) {
|
||||
if(SearchForReferencesAction.canActionBeAdded(getSelectionProvider().getSelection())) {
|
||||
search.add(fSearchForReferencesAction);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class CEditorActionContributor extends TextEditorActionContributor {
|
|||
|
||||
|
||||
public SelectionAction(String prefix, int operation) {
|
||||
super(CUIPlugin.getDefault().getResourceBundle(), prefix, null);
|
||||
super(CUIPlugin.getResourceBundle(), prefix, null);
|
||||
fOperationCode= operation;
|
||||
setEnabled(false);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class DefaultCEditorTextHover implements ITextHover
|
|||
|
||||
// We are just doing some C, call the Help to get info
|
||||
|
||||
IFunctionSummary fs = CCompletionContributorManager.getFunctionInfo(expression);
|
||||
IFunctionSummary fs = CCompletionContributorManager.getDefault().getFunctionInfo(expression);
|
||||
if(fs != null) {
|
||||
buffer.append("<b>" + HTMLPrinter.convertToHTMLContent(expression) +
|
||||
"()</b> - " + HTMLPrinter.convertToHTMLContent(fs.getSummary()) +
|
||||
|
|
|
@ -112,9 +112,9 @@ public class OpenIncludeAction extends Action {
|
|||
}
|
||||
}
|
||||
} catch (CModelException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class OpenIncludeAction extends Action {
|
|||
}
|
||||
};
|
||||
|
||||
ElementListSelectionDialog dialog= new ElementListSelectionDialog(CUIPlugin.getActiveWorkbenchShell(), renderer, false, false);
|
||||
ElementListSelectionDialog dialog= new ElementListSelectionDialog(CUIPlugin.getDefault().getActiveWorkbenchShell(), renderer, false, false);
|
||||
dialog.setTitle(CUIPlugin.getResourceString(DIALOG_TITLE));
|
||||
dialog.setMessage(CUIPlugin.getResourceString(DIALOG_MESSAGE));
|
||||
dialog.setElements(filesFound);
|
||||
|
|
|
@ -180,11 +180,11 @@ public class OpenOnSelectionAction extends Action {
|
|||
}
|
||||
}
|
||||
} catch (CModelException x) {
|
||||
CUIPlugin.log(x.getStatus());
|
||||
CUIPlugin.getDefault().log(x.getStatus());
|
||||
} catch (PartInitException x) {
|
||||
CUIPlugin.log(x);
|
||||
CUIPlugin.getDefault().log(x);
|
||||
} catch (CoreException x) {
|
||||
CUIPlugin.log(x);
|
||||
CUIPlugin.getDefault().log(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -970,7 +970,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
buffer.append(separator);
|
||||
}
|
||||
} catch (IOException io) {
|
||||
CUIPlugin.log(io);
|
||||
CUIPlugin.getDefault().log(io);
|
||||
} finally {
|
||||
if (reader != null) {
|
||||
try { reader.close(); } catch (IOException e) {}
|
||||
|
|
|
@ -88,7 +88,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
IFile file= getInputFile();
|
||||
isCProject= (file.getProject().hasNature(CProjectNature.C_NATURE_ID));
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
}
|
||||
|
||||
if (isCProject) {
|
||||
|
@ -122,7 +122,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
fWorkingDirField.setText(file.getParent().getLocation().toOSString());
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
file.setPersistentProperty(fWorkingDirPropertyName, fWorkingDirField.getText());
|
||||
} catch (CoreException e) {
|
||||
ErrorDialog.openError(fShell, "Error", null, e.getStatus());
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
try {
|
||||
fTranslator.translate(event.getDocumentEvent().getDocument().get());
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
// XXX dialog
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
|
|||
import org.eclipse.jface.viewers.TableLayout;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.viewers.ViewerSorter;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
|
@ -368,7 +369,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
template.setContext(contextTypeName); //$NON-NLS-1$
|
||||
|
||||
EditTemplateDialog dialog= new EditTemplateDialog(getShell(), template, false);
|
||||
if (dialog.open() == dialog.OK) {
|
||||
if (dialog.open() == Window.OK) {
|
||||
fTemplates.add(template);
|
||||
fTableViewer.refresh();
|
||||
fTableViewer.setChecked(template, template.isEnabled());
|
||||
|
@ -390,7 +391,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
private void edit(Template template) {
|
||||
Template newTemplate= new Template(template);
|
||||
EditTemplateDialog dialog= new EditTemplateDialog(getShell(), newTemplate, true);
|
||||
if (dialog.open() == dialog.OK) {
|
||||
if (dialog.open() == Window.OK) {
|
||||
|
||||
if (!newTemplate.getName().equals(template.getName()) &&
|
||||
MessageDialog.openQuestion(getShell(),
|
||||
|
@ -464,7 +465,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
try {
|
||||
templateSet.saveToFile(file);
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openWriteErrorDialog(e);
|
||||
}
|
||||
}
|
||||
|
@ -520,7 +521,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
try {
|
||||
fTemplates.restoreDefaults();
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openReadErrorDialog(e);
|
||||
}
|
||||
|
||||
|
@ -540,7 +541,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
try {
|
||||
fTemplates.save();
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openWriteErrorDialog(e);
|
||||
}
|
||||
|
||||
|
@ -554,7 +555,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
try {
|
||||
fTemplates.reset();
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openReadErrorDialog(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy {
|
|||
}
|
||||
}
|
||||
} catch (BadLocationException excp) {
|
||||
CUIPlugin.log(excp);
|
||||
CUIPlugin.getDefault().log(excp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy {
|
|||
|
||||
|
||||
} catch (BadLocationException excp) {
|
||||
CUIPlugin.log(excp);
|
||||
CUIPlugin.getDefault().log(excp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
|||
results= evalProposals(document, offset, length);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
}
|
||||
|
||||
if(results == null)
|
||||
|
@ -181,7 +181,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
|||
fTemplateEngine.complete(viewer, documentOffset, null);
|
||||
} catch (Exception x) {
|
||||
System.out.println("Template Exception");
|
||||
CUIPlugin.log(x);
|
||||
CUIPlugin.getDefault().log(x);
|
||||
}
|
||||
|
||||
ICCompletionProposal[] templateResults= fTemplateEngine.getResults();
|
||||
|
|
|
@ -149,7 +149,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
|||
|
||||
} catch (IOException e) {
|
||||
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
return null;
|
||||
|
||||
} finally {
|
||||
|
|
|
@ -75,7 +75,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
|||
try {
|
||||
document.replace(fReplacePosition.getOffset() + fReplaceDeltaOffset, fReplaceLength, fReplaceText);
|
||||
} catch (BadLocationException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
// TBD
|
||||
}
|
||||
document.addDocumentListener(owner);
|
||||
|
@ -140,7 +140,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
|||
try {
|
||||
fDocument.addPosition(LINKED_POSITION, new TypedPosition(offset, length, type));
|
||||
} catch (BadPositionCategoryException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
}
|
||||
}
|
||||
|
@ -184,11 +184,11 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
|||
fDocument.removePositionCategory(LINKED_POSITION);
|
||||
|
||||
} catch (BadLocationException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
|
||||
} catch (BadPositionCategoryException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
|
||||
} finally {
|
||||
|
@ -264,7 +264,7 @@ public class LinkedPositionManager implements IDocumentListener, IPositionUpdate
|
|||
return positions;
|
||||
|
||||
} catch (BadPositionCategoryException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
|
|||
openErrorDialog(fViewer.getTextWidget().getShell(), e);
|
||||
|
||||
} catch (BadPositionCategoryException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
|
|||
((flags & DOCUMENT_CHANGED) != 0));
|
||||
|
||||
} catch (BadPositionCategoryException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
Assert.isTrue(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,11 +100,11 @@ public class TemplateProposal implements ICCompletionProposal {
|
|||
fSelectedRegion= editor.getSelectedRegion();
|
||||
|
||||
} catch (BadLocationException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openErrorDialog(e);
|
||||
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openErrorDialog(e);
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class TemplateProposal implements ICCompletionProposal {
|
|||
return textToHTML(fTemplateBuffer.getString());
|
||||
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
openErrorDialog(e);
|
||||
|
||||
return null;
|
||||
|
|
|
@ -59,7 +59,7 @@ public class TemplateVariableProposal implements ICompletionProposal {
|
|||
fSelection= new Point(fOffset + variable.length(), 0);
|
||||
|
||||
} catch (BadLocationException e) {
|
||||
CUIPlugin.log(e);
|
||||
CUIPlugin.getDefault().log(e);
|
||||
|
||||
Shell shell= fViewer.getTextWidget().getShell();
|
||||
MessageDialog.openError(shell, TemplateMessages.getString("TemplateVariableProposal.error.title"), e.getMessage()); //$NON-NLS-1$
|
||||
|
|
|
@ -40,7 +40,7 @@ public class EditorUtility {
|
|||
}
|
||||
|
||||
public static IEditorPart openInEditor (IFile file) throws PartInitException {
|
||||
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||
IWorkbenchWindow window= CUIPlugin.getDefault().getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
IWorkbenchPage p= window.getActivePage();
|
||||
if (p != null) {
|
||||
|
@ -88,7 +88,7 @@ public class EditorUtility {
|
|||
|
||||
public static IEditorPart openInEditor (IStorage store, String name) throws PartInitException {
|
||||
IEditorInput ei = new ExternalEditorInput(store);
|
||||
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||
IWorkbenchWindow window= CUIPlugin.getDefault().getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
IWorkbenchPage p = window.getActivePage();
|
||||
if (p != null) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
|||
return false;
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class ProblemMarkerManager implements IResourceChangeListener {
|
|||
if (delta != null)
|
||||
delta.accept(new ProjectErrorVisitor(changedElements));
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e.getStatus());
|
||||
CUIPlugin.getDefault().log(e.getStatus());
|
||||
}
|
||||
|
||||
if (changedElements.size() > 0) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public class OpenNewFileWizardAction extends Action implements IWorkbenchWindowA
|
|||
wizard.init(CUIPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
||||
wizard.setNeedsProgressMonitor(true);
|
||||
WizardDialog dialog=
|
||||
new WizardDialog(CUIPlugin.getActiveWorkbenchShell(), wizard);
|
||||
new WizardDialog(CUIPlugin.getDefault().getActiveWorkbenchShell(), wizard);
|
||||
dialog.create();
|
||||
dialog.getShell().setText(
|
||||
CUIPlugin.getResourceString("OpenNewFileWizardAction.title")); //$NON-NLS-1$
|
||||
|
@ -35,7 +35,7 @@ public class OpenNewFileWizardAction extends Action implements IWorkbenchWindowA
|
|||
|
||||
|
||||
protected IStructuredSelection getCurrentSelection() {
|
||||
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||
IWorkbenchWindow window= CUIPlugin.getDefault().getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
ISelection selection= window.getSelectionService().getSelection();
|
||||
if (selection instanceof IStructuredSelection) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public class OpenNewFolderWizardAction extends Action implements IWorkbenchWindo
|
|||
wizard.init(CUIPlugin.getDefault().getWorkbench(), getCurrentSelection());
|
||||
wizard.setNeedsProgressMonitor(true);
|
||||
WizardDialog dialog=
|
||||
new WizardDialog(CUIPlugin.getActiveWorkbenchShell(), wizard);
|
||||
new WizardDialog(CUIPlugin.getDefault().getActiveWorkbenchShell(), wizard);
|
||||
dialog.create();
|
||||
dialog.getShell().setText(
|
||||
CUIPlugin.getResourceString("OpenNewFolderWizardAction.title")); //$NON-NLS-1$
|
||||
|
@ -32,7 +32,7 @@ public class OpenNewFolderWizardAction extends Action implements IWorkbenchWindo
|
|||
}
|
||||
|
||||
protected IStructuredSelection getCurrentSelection() {
|
||||
IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow();
|
||||
IWorkbenchWindow window= CUIPlugin.getDefault().getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
ISelection selection= window.getSelectionService().getSelection();
|
||||
if (selection instanceof IStructuredSelection) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class StringDialogField extends DialogField {
|
|||
}
|
||||
protected static MGridData gridDataForText(int span) {
|
||||
MGridData gd= new MGridData();
|
||||
gd.horizontalAlignment= gd.FILL;
|
||||
gd.horizontalAlignment= MGridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= true;
|
||||
gd.grabColumn= 0;
|
||||
gd.horizontalSpan= span;
|
||||
|
|
|
@ -656,7 +656,7 @@ public final class MGridLayout extends Layout {
|
|||
} else if (vAlign == MGridData.END) {
|
||||
widgetY= widgetY + spannedHeight - childExtent.y;
|
||||
} else {
|
||||
widgetY= widgetY;
|
||||
//widgetY= widgetY;
|
||||
}
|
||||
if (vAlign == MGridData.FILL) {
|
||||
widgetH= spannedHeight;
|
||||
|
|
|
@ -103,11 +103,11 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
return fgResourceBundle;
|
||||
}
|
||||
|
||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||
public IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||
}
|
||||
|
||||
public static Shell getActiveWorkbenchShell() {
|
||||
public Shell getActiveWorkbenchShell() {
|
||||
return getActiveWorkbenchWindow().getShell();
|
||||
}
|
||||
|
||||
|
@ -115,11 +115,11 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
return fgCPlugin;
|
||||
}
|
||||
|
||||
public static void log(Throwable e) {
|
||||
public void log(Throwable e) {
|
||||
log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e));
|
||||
}
|
||||
|
||||
public static void log(IStatus status) {
|
||||
public void log(IStatus status) {
|
||||
getDefault().getLog().log(status);
|
||||
}
|
||||
|
||||
|
|
|
@ -259,12 +259,12 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
|||
IStatus status= ((CoreException)th).getStatus();
|
||||
if (status != null) {
|
||||
ErrorDialog.openError(shell, title, message, status);
|
||||
CUIPlugin.log(status);
|
||||
CUIPlugin.getDefault().log(status);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
MessageDialog.openError(shell, title, message);
|
||||
CUIPlugin.log(th);
|
||||
CUIPlugin.getDefault().log(th);
|
||||
try {
|
||||
getProjectHandle().delete(false, false, null);
|
||||
} catch (CoreException ignore) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public abstract class StdMakeProjectWizard extends CProjectWizard {
|
|||
}
|
||||
|
||||
public String getProjectID() {
|
||||
return CCorePlugin.getDefault().PLUGIN_ID + ".make";
|
||||
return CCorePlugin.PLUGIN_ID + ".make";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ public class TabFolderPage extends WizardPage implements IValidation {
|
|||
tabFolder.setLayout(new TabFolderLayout());
|
||||
|
||||
MGridData gd= new MGridData();
|
||||
gd.horizontalAlignment= gd.FILL;
|
||||
gd.horizontalAlignment= MGridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= true;
|
||||
gd.verticalAlignment= gd.FILL;
|
||||
gd.verticalAlignment= MGridData.FILL;
|
||||
gd.grabExcessVerticalSpace= true;
|
||||
tabFolder.setLayoutData(gd);
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ public abstract class ConversionWizard
|
|||
* The default if a make project
|
||||
*/
|
||||
public String getProjectID() {
|
||||
return CCorePlugin.getDefault().PLUGIN_ID + ".make";//$NON-NLS-1$
|
||||
return CCorePlugin.PLUGIN_ID + ".make";//$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -504,14 +504,14 @@ public abstract class ConvertProjectWizardPage
|
|||
}
|
||||
}
|
||||
protected void addCNature(IProject project, IProgressMonitor monitor, boolean addMakeBuilder) throws CoreException{
|
||||
CCorePlugin.getDefault().convertProjectToC(project, monitor, CCorePlugin.getDefault().PLUGIN_ID + ".make", addMakeBuilder); //$NON-NLS-1$
|
||||
CCorePlugin.getDefault().convertProjectToC(project, monitor, CCorePlugin.PLUGIN_ID + ".make", addMakeBuilder); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
protected void addCCNature(IProject project, IProgressMonitor monitor, boolean addMakeBuilder) throws CoreException{
|
||||
if (project.hasNature(CProjectNature.C_NATURE_ID)) {
|
||||
CCorePlugin.getDefault().convertProjectFromCtoCC(project, monitor); //$NON-NLS-1$
|
||||
} else {
|
||||
CCorePlugin.getDefault().convertProjectToCC(project, monitor, CCorePlugin.getDefault().PLUGIN_ID + ".make", addMakeBuilder); //$NON-NLS-1$
|
||||
CCorePlugin.getDefault().convertProjectToCC(project, monitor, CCorePlugin.PLUGIN_ID + ".make", addMakeBuilder); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue