1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00

Fix warnings about CUIPlugin.getDefault().log()

This commit is contained in:
Anton Leherbauer 2008-03-19 13:25:18 +00:00
parent 7c22f386b8
commit df5acf9f9c
107 changed files with 195 additions and 199 deletions

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.wizards.CWizardHandler;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.SWT;
@ -226,7 +225,7 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.managedbuilder.internal.core.Builder;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.cdt.ui.newui.ICPropertyProvider;
import org.eclipse.core.runtime.CoreException;
@ -528,7 +527,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
icfg.getEditableBuilder().setBuildAttribute(name, value);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}
@ -564,7 +563,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}
}

View file

@ -17,7 +17,6 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.SWT;
@ -374,7 +373,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
icfg.getEditableBuilder().setUseDefaultBuildCmd(val);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}
@ -439,7 +438,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
icfg.getEditableBuilder().setManagedBuildOn(on);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}
}

View file

@ -227,7 +227,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
}
if (s == null) s = Messages.getString("DiscoveryTab.3"); //$NON-NLS-1$
}
IScannerConfigBuilderInfo2 bi2 = (IScannerConfigBuilderInfo2)m.get(ic);
IScannerConfigBuilderInfo2 bi2 = m.get(ic);
TableItem ti = new TableItem(resTable, SWT.NONE);
ti.setText(s);
ti.setData("cont", ic); //$NON-NLS-1$
@ -442,11 +442,11 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
Map<CfgInfoContext, IScannerConfigBuilderInfo2> m2 = cbi2.getInfoMap();
for (CfgInfoContext ic : m2.keySet()) {
if (m1.keySet().contains(ic)) {
IScannerConfigBuilderInfo2 bi1 = (IScannerConfigBuilderInfo2)m1.get(ic);
IScannerConfigBuilderInfo2 bi1 = m1.get(ic);
try {
cbi2.applyInfo(ic, bi1);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
} else {
CUIPlugin.getDefault().logErrorMessage(Messages.getString("DiscoveryTab.7")); //$NON-NLS-1$
@ -468,7 +468,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
String savedId = buildInfo.getSelectedProfileId();
for (int i=0; i<realPages.length; i++) {
if (realPages != null && realPages[i] != null) {
String s = (String)visibleProfilesList.get(i);
String s = visibleProfilesList.get(i);
buildInfo.setSelectedProfileId(s);
realPages[i].performApply();
realPages[i].setVisible(false);
@ -484,7 +484,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
List<CfgInfoContext> changedContexts = checkChanges();
IProject project = getProject();
for(int i = 0; i < changedContexts.size(); i++){
CfgInfoContext c = (CfgInfoContext)changedContexts.get(i);
CfgInfoContext c = changedContexts.get(i);
CfgDiscoveredPathManager.getInstance().removeDiscoveredInfo(project, c);
// MakeCorePlugin.getDefault().getDiscoveryManager().removeDiscoveredInfo(c.getProject(), c);
}
@ -498,12 +498,12 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
HashMap<InfoContext, Object> baseCopy = new HashMap<InfoContext, Object>(baseInfoMap);
List<CfgInfoContext> list = new ArrayList<CfgInfoContext>();
for(Map.Entry<CfgInfoContext, IScannerConfigBuilderInfo2> entry : cfgInfoMap.entrySet()){
CfgInfoContext cic = (CfgInfoContext)entry.getKey();
CfgInfoContext cic = entry.getKey();
InfoContext c = cic.toInfoContext();
if(c == null)
continue;
IScannerConfigBuilderInfo2 changed = (IScannerConfigBuilderInfo2)entry.getValue();
IScannerConfigBuilderInfo2 changed = entry.getValue();
IScannerConfigBuilderInfo2 old = (IScannerConfigBuilderInfo2)baseCopy.remove(c);
if(old == null){

View file

@ -37,7 +37,6 @@ import org.eclipse.cdt.managedbuilder.tcmodification.IModificationOperation;
import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager;
import org.eclipse.cdt.managedbuilder.tcmodification.IToolListModification;
import org.eclipse.cdt.managedbuilder.tcmodification.IToolModification;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
@ -244,7 +243,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
Collections.sort(list, BuildListComparator.getInstance());
int pos = -1;
v_tcs = (IToolChain[]) list.toArray(new IToolChain[list.size()]);
v_tcs = list.toArray(new IToolChain[list.size()]);
for (int i=0; i<v_tcs.length; i++) {
c_toolchain.add(v_tcs[i].getUniqueRealName());
if (v_tcs[i].matches(tc)) pos = i;
@ -284,7 +283,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
}
bs = null;
Collections.sort(list, BuildListComparator.getInstance());
v_bs = (IBuilder[])list.toArray(new IBuilder[list.size()]);
v_bs = list.toArray(new IBuilder[list.size()]);
for (int i=0; i<v_bs.length; i++) {
c_builder.add(v_bs[i].getUniqueRealName());
if (v_bs[i].matches(b)) pos = i;
@ -417,7 +416,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
}
}
Collections.sort(list, BuildListComparator.getInstance());
v_tools = (ITool[]) list.toArray(new ITool[list.size()]);
v_tools = list.toArray(new ITool[list.size()]);
return result;
}
@ -435,7 +434,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
(IToolListModification)tcmmgr.createModification(cfg, (IFileInfoModification)mod);
tlm.apply();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}
@ -510,7 +509,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
try {
mod.apply();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
ManagedBuilderUIPlugin.log(e);
}
}

View file

@ -122,7 +122,7 @@ public class DOMASTPluginImages {
try {
return new URL(fgIconBaseURL, buffer.toString());
} catch (MalformedURLException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return null;
}
}

View file

@ -56,7 +56,7 @@ public class TestGenericTagConfiguration extends AbstractGenericTagDocCommentVie
return false;
}
} catch(BadLocationException ble) {
CUIPlugin.getDefault().log(ble);
CUIPlugin.log(ble);
}
return false;
}

View file

@ -509,7 +509,7 @@ public class StubUtility {
try {
projectStore.load();
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return projectStore.findTemplateById(id);
}
@ -557,7 +557,7 @@ public class StubUtility {
try {
projectStore.load();
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
templateDatas= projectStore.getTemplateData();
}

View file

@ -213,7 +213,7 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
return ((CElementGrouping)element).getChildren(element);
}
} catch (CModelException e) {
//CUIPlugin.getDefault().log(e);
//CUIPlugin.log(e);
return NO_CHILDREN;
}
return NO_CHILDREN;

View file

@ -38,7 +38,7 @@ public class CPluginImages {
try {
fgIconBaseURL= new URL(CUIPlugin.getDefault().getBundle().getEntry("/"), "icons/" ); //$NON-NLS-1$ //$NON-NLS-2$
} catch (MalformedURLException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
private static final String NAME_PREFIX= CUIPlugin.PLUGIN_ID + '.';
@ -367,7 +367,7 @@ public class CPluginImages {
try {
return new URL(fgIconBaseURL, buffer.toString());
} catch (MalformedURLException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return null;
}
}

View file

@ -47,7 +47,7 @@ public class CWorkbenchAdapter implements IWorkbenchAdapter, IActionFilter {
return members;
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return fgEmptyArray;

View file

@ -57,7 +57,7 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate
CCorePlugin.getIndexManager().update(tuArray, getUpdateOptions());
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -97,7 +97,7 @@ public class GoToNextPreviousMemberAction extends TextEditorAction {
editor.selectAndReveal(next.getSourceRange().getIdStartPos(), 0);
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -111,7 +111,7 @@ public class IndentAction extends TextEditorAction {
document.addPosition(end);
} catch (BadLocationException e) {
// will only happen on concurrent modification
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, "", e)); //$NON-NLS-1$
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, "", e)); //$NON-NLS-1$
return;
}
@ -148,7 +148,7 @@ public class IndentAction extends TextEditorAction {
} catch (BadLocationException e) {
// will only happen on concurrent modification
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, "ConcurrentModification in IndentAction", e)); //$NON-NLS-1$
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, "ConcurrentModification in IndentAction", e)); //$NON-NLS-1$
} finally {
document.removePosition(end);
if (target != null)

View file

@ -100,7 +100,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
try {
consoleView = page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
} catch (PartInitException pie) {
CUIPlugin.getDefault().log(pie);
CUIPlugin.log(pie);
}
//restore focus stolen by the creation of the
// console

View file

@ -100,7 +100,7 @@ public class CHContentProvider extends AsyncTreeContentProvider {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}

View file

@ -189,7 +189,7 @@ public class CallHierarchyUI {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
@ -229,7 +229,7 @@ public class CallHierarchyUI {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();

View file

@ -116,7 +116,7 @@ public class CStructureCreator extends StructureCreator {
// build structure
ast.accept(structureCreator);
} catch (CoreException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
}
return root;

View file

@ -75,7 +75,7 @@ public class ArchiveFileFilter extends ViewerFilter {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e.getStatus());
CUIPlugin.log(e.getStatus());
}
}
return false;

View file

@ -349,7 +349,7 @@ public class CPathContainerDescriptor implements IContainerDescriptor {
containers.add(curr);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
if (defaultPageName != null && containers.isEmpty()) {

View file

@ -146,7 +146,7 @@ public class CPathProjectsEntryPage extends CPathBasePage {
}
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
fProjectsList.setElements(projects);
fProjectsList.setCheckedElements(checkedProjects);

View file

@ -153,7 +153,7 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList
try {
return proj.hasNature(CProjectNature.C_NATURE_ID);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return false;
}

View file

@ -174,7 +174,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus
try {
return proj.hasNature(CProjectNature.C_NATURE_ID);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return false;
}
@ -252,7 +252,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus
try {
fIncludesSymbolsBlock.init(getCElement(), fIncludesSymbolsBlock.getRawCPath());
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -154,7 +154,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate {
index = CCorePlugin.getIndexManager().getIndex(tu.getCProject(), IIndexManager.ADD_DEPENDENCIES);
index.acquireReadLock();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return;
} catch (InterruptedException e) {
return;

View file

@ -700,9 +700,9 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
event.doit = false;
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (BadPositionCategoryException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -733,7 +733,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
level.fSecondPosition.length,
null);
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -742,7 +742,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
try {
document.removePositionCategory(CATEGORY);
} catch (BadPositionCategoryException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}
@ -1677,7 +1677,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
return unit.getElementAtOffset(offset);
}
} catch (CModelException x) {
CUIPlugin.getDefault().log(x.getStatus());
CUIPlugin.log(x.getStatus());
// nothing found, be tolerant and go on
}
}

View file

@ -118,7 +118,7 @@ public class DefaultBinaryFileEditor extends AbstractTextEditor {
try {
fStorage= new FileStorage(new ByteArrayInputStream(objdump.getOutput()), object.getPath());
} catch (IOException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
}
}
}

View file

@ -460,7 +460,7 @@ public class DocumentAdapter implements IBuffer, IDocumentListener {
existingDelimiters.add(curr);
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
if (existingDelimiters.isEmpty()) {
@ -485,10 +485,10 @@ public class DocumentAdapter implements IBuffer, IDocumentListener {
for (int k= 0; k < curr.length(); k++) {
buf.append(String.valueOf((int) curr.charAt(k)));
}
CUIPlugin.getDefault().log(new Exception(buf.toString()));
CUIPlugin.log(new Exception(buf.toString()));
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -152,9 +152,9 @@ public class OpenIncludeAction extends Action {
EditorUtility.openInEditor(fileToOpen, include);
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e.getStatus());
CUIPlugin.log(e.getStatus());
} catch (CoreException e) {
CUIPlugin.getDefault().log(e.getStatus());
CUIPlugin.log(e.getStatus());
}
}

View file

@ -439,10 +439,10 @@ public class SemanticHighlightingPresenter implements ITextPresentationListener,
}
} catch (BadPositionCategoryException e) {
// Should not happen
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (BadLocationException e) {
// Should not happen
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
// checkOrdering("new positions: ", fPositions); //$NON-NLS-1$
@ -724,10 +724,10 @@ public class SemanticHighlightingPresenter implements ITextPresentationListener,
document.addPosition(positionCategory, position);
} catch (BadLocationException e) {
// Should not happen
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (BadPositionCategoryException e) {
// Should not happen
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -766,7 +766,7 @@ public class SemanticHighlightingPresenter implements ITextPresentationListener,
document.removePositionCategory(getPositionCategory());
} catch (BadPositionCategoryException e) {
// Should not happen
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -512,7 +512,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
try {
oldJob.join();
} catch (InterruptedException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return Status.CANCEL_STATUS;
}
}

View file

@ -247,7 +247,7 @@ public class SemanticHighlightings {
try {
return ((IField)binding).isStatic();
} catch (DOMException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (Error e) /* PDOMNotImplementedError */ {
// ignore
}
@ -477,7 +477,7 @@ public class SemanticHighlightings {
try {
return ((ICPPMethod)binding).isStatic();
} catch (DOMException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (Error e) /* PDOMNotImplementedError */ {
// ignore
}
@ -771,7 +771,7 @@ public class SemanticHighlightings {
return true;
}
} catch (DOMException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (Error e) /* PDOMNotImplementedError */ {
// ignore
}
@ -849,7 +849,7 @@ public class SemanticHighlightings {
return true;
}
} catch (DOMException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (Error e) /* PDOMNotImplementedError */ {
// ignore
}
@ -945,7 +945,7 @@ public class SemanticHighlightings {
return true;
}
} catch (DOMException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (Error e) /* PDOMNotImplementedError */ {
// ignore
}
@ -1746,7 +1746,7 @@ public class SemanticHighlightings {
return true;
}
} catch (CoreException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
return false;
}
}

View file

@ -163,7 +163,7 @@ public final class ToggleCommentAction extends TextEditorAction {
} catch (BadLocationException x) {
// should not happen
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
return false;
@ -186,7 +186,7 @@ public final class ToggleCommentAction extends TextEditorAction {
} catch (BadLocationException x) {
// should not happen
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
return null;
@ -214,7 +214,7 @@ public final class ToggleCommentAction extends TextEditorAction {
} catch (BadLocationException x) {
// should not happen
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
return -1;
@ -260,7 +260,7 @@ public final class ToggleCommentAction extends TextEditorAction {
} catch (BadLocationException x) {
// should not happen
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
return false;

View file

@ -158,7 +158,7 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
}
}
} catch (CoreException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
}
}
}
@ -210,9 +210,9 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
try {
EditorUtility.openInEditor(partnerUnit);
} catch (PartInitException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
} catch (CModelException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
}
}
}

View file

@ -59,7 +59,7 @@ public class TranslationUnitAnnotationModelEvent extends AnnotationModelEvent {
fIncludesProblemMarkerAnnotations= true;
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -91,7 +91,7 @@ public class AsmReconcilingStrategy implements IReconcilingStrategy, IReconcilin
// document was modified while parsing
} catch (CModelException e) {
IStatus status= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK, "Error in CDT UI during reconcile", e); //$NON-NLS-1$
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
}
}

View file

@ -341,7 +341,7 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
try {
return ((ITranslationUnit)element).getLanguage();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
} else {
// compute the language from the plain editor input

View file

@ -343,7 +343,7 @@ public class AsmTextEditor extends TextEditor implements ISelectionChangedListen
return unit.getElementAtOffset(offset);
}
} catch (CModelException x) {
CUIPlugin.getDefault().log(x.getStatus());
CUIPlugin.log(x.getStatus());
// nothing found, be tolerant and go on
}
}

View file

@ -84,7 +84,7 @@ public class IBContentProvider extends AsyncTreeContentProvider {
index= CCorePlugin.getIndexManager().getIndex(scope);
index.acquireReadLock();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return NO_CHILDREN;
} catch (InterruptedException e) {
return NO_CHILDREN;
@ -127,7 +127,7 @@ public class IBContentProvider extends AsyncTreeContentProvider {
result.add(newnode);
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -176,7 +176,7 @@ public class IBContentProvider extends AsyncTreeContentProvider {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return new IIndexInclude[0];
}
@ -205,7 +205,7 @@ public class IBContentProvider extends AsyncTreeContentProvider {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return new IIndexInclude[0];
}

View file

@ -99,7 +99,7 @@ public class IBConversions {
try {
return CoreModelUtil.findTranslationUnitForLocation(path, null);
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -130,7 +130,7 @@ public class CountNodeAction extends IndexAction {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;

View file

@ -192,7 +192,7 @@ public class IndexLabelProvider extends LabelProvider {
break;
}
} catch (DOMException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
else if (element instanceof ICompositeType)

View file

@ -190,7 +190,7 @@ public class IndexView extends ViewPart implements PDOM.IListener, IElementChang
try {
return element.getCProjects();
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return new Object[0];
}
}
@ -236,7 +236,7 @@ public class IndexView extends ViewPart implements PDOM.IListener, IElementChang
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
@ -305,7 +305,7 @@ public class IndexView extends ViewPart implements PDOM.IListener, IElementChang
pdom.addListener(this);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
CoreModel.getDefault().addElementChangedListener(this);
@ -349,7 +349,7 @@ public class IndexView extends ViewPart implements PDOM.IListener, IElementChang
pdom.removeListener(this);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
CoreModel.getDefault().removeElementChangedListener(this);
}

View file

@ -77,7 +77,7 @@ public class OpenDefinitionAction extends IndexAction {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
catch (InterruptedException e) {
}
@ -123,7 +123,7 @@ public class OpenDefinitionAction extends IndexAction {
}
textEditor.selectAndReveal(nodeOffset, nodeLength);
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -99,7 +99,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage {
try {
createMappingTable(fContents, file);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
Link link = new Link(fContents, SWT.NONE);
@ -109,7 +109,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage {
try {
refreshMappings();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
});
@ -184,7 +184,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage {
try {
refreshMappings();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -53,7 +53,7 @@ public class OpenCElementAction extends OpenFileAction {
EditorUtility.revealInEditor(part, fOpenElement);
}
} catch (CoreException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
}
} else {
super.run();

View file

@ -821,7 +821,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
buffer.append(separator);
}
} catch (IOException io) {
CUIPlugin.getDefault().log(io);
CUIPlugin.log(io);
} finally {
if (reader != null) {
try { reader.close(); } catch (IOException e) {}
@ -906,7 +906,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
int offset= document.getLineOffset(line) + column;
return new HighlightedRange(offset, length, key);
} catch (BadLocationException x) {
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
return null;
}

View file

@ -316,7 +316,7 @@ public class CodeTemplateBlock extends OptionsConfigurationBlock {
try {
fTemplateStore.load();
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
fTemplateProcessor= new TemplateVariableProcessor();
@ -793,7 +793,7 @@ public class CodeTemplateBlock extends OptionsConfigurationBlock {
try {
fTemplateStore.save();
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
openWriteErrorDialog();
}
return true;

View file

@ -273,7 +273,7 @@ class FoldingConfigurationBlock implements IPreferenceConfigurationBlock {
if (desc == null) {
// safety in case there is no such descriptor
String message= PreferencesMessages.FoldingConfigurationBlock_error_not_exist;
CUIPlugin.getDefault().log(new Status(IStatus.WARNING, CUIPlugin.getPluginId(), IStatus.OK, message, null));
CUIPlugin.log(new Status(IStatus.WARNING, CUIPlugin.getPluginId(), IStatus.OK, message, null));
prefs= new ErrorPreferences(message);
} else {
prefs= (ICFoldingPreferenceBlock) fProviderPreferences.get(id);
@ -282,7 +282,7 @@ class FoldingConfigurationBlock implements IPreferenceConfigurationBlock {
prefs= desc.createPreferences();
fProviderPreferences.put(id, prefs);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
prefs= new ErrorPreferences(e.getLocalizedMessage());
}
}

View file

@ -743,7 +743,7 @@ public abstract class OptionsConfigurationBlock {
try {
fManager.applyChanges();
} catch (BackingStoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return false;
}
if (doBuild) {

View file

@ -63,7 +63,7 @@ public class ProposalFilterPreferencesUtil {
}
} catch (InvalidRegistryObjectException e) {
// No action required since we will at least be using the fail-safe default filter
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
String[] filterNames = (String[]) names
.toArray(new String[names.size()]);

View file

@ -749,7 +749,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
changeForceSplit(currentKey, forceSplit);
} catch (IllegalArgumentException e) {
fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(forceSplit, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK,
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK,
Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
}
}
@ -773,7 +773,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
changeWrappingStyle(currentKey, wrappingStyle);
} catch (IllegalArgumentException e) {
fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(false, wrappingStyle, DefaultCodeFormatterConstants.INDENT_DEFAULT));
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK,
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK,
Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
}
}
@ -797,7 +797,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
changeIndentStyle(currentKey, indentStyle);
} catch (IllegalArgumentException e) {
fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, indentStyle));
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK,
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK,
Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
}
}

View file

@ -431,7 +431,7 @@ public abstract class ModifyDialogTabPage implements IModifyDialogTabPage {
fSelected= Integer.parseInt(s);
} catch (NumberFormatException e) {
final String message= Messages.format(FormatterMessages.ModifyDialogTabPage_NumberPreference_error_invalid_key, getKey());
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, message, e));
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, message, e));
s= ""; //$NON-NLS-1$
}
fNumberText.setText(s);

View file

@ -74,7 +74,7 @@ public abstract class ProfileConfigurationBlock {
fProfileStore.writeProfiles(fProfileManager.getSortedProfiles(), fInstanceScope); // update profile store
fProfileManager.commitChanges(fCurrContext);
} catch (CoreException x) {
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
break;
case ProfileManager.SELECTION_CHANGED_EVENT:
@ -279,14 +279,14 @@ public abstract class ProfileConfigurationBlock {
try {
profiles= fProfileStore.readProfiles(fInstanceScope);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
if (profiles == null) {
try {
// bug 129427
profiles= fProfileStore.readProfiles(new DefaultScope());
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -416,7 +416,7 @@ public abstract class ProfileConfigurationBlock {
fInstanceScope.getNode(CCorePlugin.PLUGIN_ID).flush();
}
} catch (BackingStoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -76,7 +76,7 @@ public class SnippetPreview extends CPreview {
} catch (Exception e) {
final IStatus status= new Status(IStatus.ERROR, CUIPlugin.getPluginId(), ICStatusConstants.INTERNAL_ERROR,
FormatterMessages.CPreview_formatter_exception, e);
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
continue;
}
buffer.append(delimiter);

View file

@ -71,7 +71,7 @@ public class TranslationUnitPreview extends CPreview {
} catch (Exception e) {
final IStatus status= new Status(IStatus.ERROR, CUIPlugin.getPluginId(), ICStatusConstants.INTERNAL_ERROR,
FormatterMessages.CPreview_formatter_exception, e);
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
} finally {
context.dispose();
fSourceViewer.setRedraw(true);

View file

@ -73,7 +73,7 @@ public class MethodContext {
try {
label.setVisibility(member.getVisibility());
} catch (DOMException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return label;
}

View file

@ -51,7 +51,7 @@ public class ExtractConstantRefactoringRunner extends RefactoringRunner {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -1158,7 +1158,7 @@ public class ASTManager {
try {
conflicting= findInScope(scope, fRenameTo, true);
} catch (Exception e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
if (conflicting != null && conflicting.length > 0) {
fConflictingBinding.addAll(Arrays.asList(conflicting));

View file

@ -51,9 +51,9 @@ public class FileContentHelper {
return new String(bytes);
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return ""; //$NON-NLS-1$
}

View file

@ -82,7 +82,7 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
projects = projectMap.values().toArray(new ICProject[projectMap.size()]);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -127,7 +127,7 @@ public class PDOMSearchResult extends AbstractTextSearchResult implements IEdito
if (filename != null)
return computeContainedMatches(result, filename);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return new Match[0];
}
@ -137,7 +137,7 @@ public class PDOMSearchResult extends AbstractTextSearchResult implements IEdito
String filename = file.getLocation().toOSString();
return computeContainedMatches(result, filename);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return new Match[0];
}

View file

@ -154,7 +154,7 @@ public class PDOMSearchViewPage extends AbstractTextSearchViewPage {
textEditor.selectAndReveal(currentOffset, currentLength);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -390,7 +390,7 @@ public abstract class AbstractInformationControl extends PopupDialog implements
if (part != null && selectedElement instanceof ICElement)
EditorUtility.revealInEditor(part, (ICElement) selectedElement);
} catch (CoreException ex) {
CUIPlugin.getDefault().log(ex);
CUIPlugin.log(ex);
}
}
}

View file

@ -197,7 +197,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
}
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -240,7 +240,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -342,7 +342,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
c.text = buf.toString();
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -639,7 +639,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
command.length= newLength;
command.text= newText;
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -1028,7 +1028,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
return;
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -1094,7 +1094,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
return;
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -1110,7 +1110,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
}
}
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
@ -1184,7 +1184,7 @@ public class CAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
char[] buffer = contents.toString().toCharArray();
return new CompilationUnitInfo(buffer, sourceRange.getOffset() - methodOffset);
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return null;

View file

@ -68,11 +68,11 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
edit.apply(document);
} catch (MalformedTreeException exception) {
CUIPlugin.getDefault().log(exception);
CUIPlugin.log(exception);
} catch (BadLocationException exception) {
// Can only happen on concurrent document modification - log and
// bail out
CUIPlugin.getDefault().log(exception);
CUIPlugin.log(exception);
}
}
}

View file

@ -130,7 +130,7 @@ public class CReconcilingStrategy implements IReconcilingStrategy, IReconcilingS
// document was modified while parsing
} catch (CModelException e) {
IStatus status= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK, "Error in CDT UI during reconcile", e); //$NON-NLS-1$
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
} finally {
if (computeAST) {
IIndex index= null;
@ -150,7 +150,7 @@ public class CReconcilingStrategy implements IReconcilingStrategy, IReconcilingS
}
} catch(Exception e) {
IStatus status= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK, "Error in CDT UI during reconcile", e); //$NON-NLS-1$
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
} finally {
if (index != null) {
index.releaseReadLock();

View file

@ -154,7 +154,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
} catch (IOException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return null;
} finally {

View file

@ -110,7 +110,7 @@ public class CEditorTextHoverDescriptor implements Comparable {
try {
return (ICEditorTextHover)fElement.createExecutableExtension(CLASS_ATTRIBUTE);
} catch (CoreException x) {
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), 0, "CEditorTextHover.createTextHover", null)); //$NON-NLS-1$
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), 0, "CEditorTextHover.createTextHover", null)); //$NON-NLS-1$
}
}

View file

@ -258,7 +258,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
}
dispose();
} catch (PartInitException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
}
}
}

View file

@ -790,7 +790,7 @@ public class CSourceHover extends AbstractCEditorTextHover implements ITextHover
if (reader != null)
reader.close();
} catch (IOException ex) {
CUIPlugin.getDefault().log(ex);
CUIPlugin.log(ex);
}
}

View file

@ -59,7 +59,7 @@ class ProjectMap {
try {
fMap= load(project);
} catch(CoreException ce) {
CUIPlugin.getDefault().log(ce);
CUIPlugin.log(ce);
fMap= new HashMap<IPath, String>();
}
fProject= project;
@ -106,7 +106,7 @@ class ProjectMap {
try {
save();
} catch(CoreException ce) {
CUIPlugin.getDefault().log(ce);
CUIPlugin.log(ce);
}
}

View file

@ -78,7 +78,7 @@ public class CFoldingStructureProviderRegistry {
try {
return desc.createProvider();
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return null;

View file

@ -145,7 +145,7 @@ public class CSpellingEngine extends SpellingEngine {
}
}
} catch (BadLocationException x) {
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
} finally {
if(toRemove!=null)

View file

@ -72,7 +72,7 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
if (location == null)
return fgLocalesWithInstalledDictionaries= Collections.EMPTY_SET;
} catch (MalformedURLException ex) {
CUIPlugin.getDefault().log(ex);
CUIPlugin.log(ex);
return fgLocalesWithInstalledDictionaries= Collections.EMPTY_SET;
}
@ -86,7 +86,7 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
if (fileNames == null)
return fgLocalesWithInstalledDictionaries= Collections.EMPTY_SET;
} catch (IOException ex) {
CUIPlugin.getDefault().log(ex);
CUIPlugin.log(ex);
return fgLocalesWithInstalledDictionaries= Collections.EMPTY_SET;
}

View file

@ -91,7 +91,7 @@ public final class WordCompletionProposalComputer implements ICompletionProposal
}
} catch (BadLocationException exception) {
// log & ignore
CUIPlugin.getDefault().log(exception);
CUIPlugin.log(exception);
}
}
return Collections.EMPTY_LIST;

View file

@ -495,7 +495,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
String message= Messages.bind(Messages.AbstractSpellingDictionary_encodingError,
new String[] { word, decoder.replacement(), url.toString() });
IStatus status= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK, message, ex);
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
doRead= word != null;
continue;
@ -510,12 +510,12 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
String urlString= url.toString();
String lowercaseUrlString= urlString.toLowerCase();
if (urlString.equals(lowercaseUrlString)) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} else {
try {
return load(new URL(lowercaseUrlString));
} catch (MalformedURLException ex) {
CUIPlugin.getDefault().log(ex);
CUIPlugin.log(ex);
}
}
} catch (IOException exception) {
@ -523,9 +523,9 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
String message= Messages.bind(Messages.AbstractSpellingDictionary_encodingError,
String.valueOf(line), url.toString());
IStatus status= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, IStatus.OK, message, exception);
CUIPlugin.getDefault().log(status);
CUIPlugin.log(status);
} else {
CUIPlugin.getDefault().log(exception);
CUIPlugin.log(exception);
}
} finally {
fMustLoad= false;

View file

@ -73,7 +73,7 @@ public class PersistentSpellDictionary extends AbstractSpellDictionary {
fileStream.write(byteArray, bomCutSize, size - bomCutSize);
} catch (IOException exception) {
CUIPlugin.getDefault().log(exception);
CUIPlugin.log(exception);
return;
} finally {
try {

View file

@ -72,7 +72,7 @@ public class TemplateVariableProposal implements ICompletionProposal {
fSelection= new Point(fOffset + variable.length(), 0);
} catch (BadLocationException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
Shell shell= fViewer.getTextWidget().getShell();
MessageDialog.openError(shell, TemplateMessages.TemplateVariableProposal_error_title, e.getMessage());

View file

@ -137,7 +137,7 @@ class THGraph {
fInputNode= addNode(input);
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}
@ -202,9 +202,9 @@ class THGraph {
}
} catch (DOMException e) {
// index bindings should not throw this kind of exception, might as well log it.
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}
@ -252,7 +252,7 @@ class THGraph {
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -165,7 +165,7 @@ class THHierarchyModel {
index.releaseReadLock();
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
} catch (InterruptedException e) {
return Status.CANCEL_STATUS;
}

View file

@ -71,7 +71,7 @@ public class THInformationControl extends AbstractInformationControl implements
try {
EditorOpener.open(CUIPlugin.getActivePage(), elem);
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}

View file

@ -94,7 +94,7 @@ public class TypeHierarchyUI {
try {
return findInput(project, editorInput, region);
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
}
@ -171,7 +171,7 @@ public class TypeHierarchyUI {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
catch (InterruptedException e) {
}
@ -204,7 +204,7 @@ public class TypeHierarchyUI {
}
}
catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
catch (InterruptedException e) {
}
@ -330,7 +330,7 @@ public class TypeHierarchyUI {
return element.getElementName();
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return null;

View file

@ -58,7 +58,7 @@ public class CUIHelp {
try {
CHelpDisplayContext.displayHelp(fContextId, fEditor);
} catch (CoreException x) {
CUIPlugin.getDefault().log(x);
CUIPlugin.log(x);
}
}
}

View file

@ -146,7 +146,7 @@ public class EditorUtility {
ISourceRange range= reference.getSourceRange();
((ITextEditor)part).selectAndReveal(range.getIdStartPos(), range.getIdLength());
} catch (CModelException exc) {
CUIPlugin.getDefault().log(exc.getStatus());
CUIPlugin.log(exc.getStatus());
}
}
}

View file

@ -42,7 +42,7 @@ public class ExceptionHandler {
* logged as an error with the error code <code>JavaStatusConstants.INTERNAL_ERROR</code>.
*/
public static void log(Throwable t, String message) {
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(),
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(),
CStatusConstants.INTERNAL_ERROR, message, t));
}
@ -97,7 +97,7 @@ public class ExceptionHandler {
//---- Hooks for subclasses to control exception handling ------------------------------------
protected void perform(CoreException e, Shell shell, String title, String message) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
IStatus status= e.getStatus();
if (status != null) {
ErrorDialog.openError(shell, title, message, status);
@ -111,7 +111,7 @@ public class ExceptionHandler {
if (target instanceof CoreException) {
perform((CoreException)target, shell, title, message);
} else {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
if (e.getMessage() != null && e.getMessage().length() > 0) {
displayMessageDialog(e, e.getMessage(), shell, title, message);
} else {

View file

@ -60,7 +60,7 @@ public class OpenExternalProblemAction extends ActionDelegate implements IObject
}
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e.getStatus());
CUIPlugin.log(e.getStatus());
}
}
}

View file

@ -111,7 +111,7 @@ public class ProblemMarkerManager implements IResourceChangeListener, IAnnotatio
if (delta != null)
delta.accept(new ProjectErrorVisitor(changedElements));
} catch (CoreException e) {
CUIPlugin.getDefault().log(e.getStatus());
CUIPlugin.log(e.getStatus());
}
if (!changedElements.isEmpty()) {

View file

@ -53,7 +53,7 @@ public class EditorOpener {
try {
editor= IDE.openEditor(page, file, false);
} catch (PartInitException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
selectRegion(file.getFullPath(), region, timestamp, editor);
}
@ -81,7 +81,7 @@ public class EditorOpener {
}
selectRegion(location, region, timestamp, editor);
} catch (PartInitException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}

View file

@ -319,7 +319,7 @@ public class IndexUI {
try {
return CoreModelUtil.findTranslationUnitForLocation(path, cproject);
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return null;

View file

@ -189,7 +189,7 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
return 0;
}
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
return 0;
}

View file

@ -53,7 +53,7 @@ public abstract class NewElementWizard extends Wizard implements INewWizard {
try {
IDE.openEditor(activePage, resource, true);
} catch (PartInitException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
});

View file

@ -254,9 +254,9 @@ public class NewClassCodeGenerator {
edit.apply(doc);
content= doc.get();
} catch (MalformedTreeException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
} catch (BadLocationException exc) {
CUIPlugin.getDefault().log(exc);
CUIPlugin.log(exc);
}
}
return content;
@ -383,7 +383,7 @@ public class NewClassCodeGenerator {
return comment;
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return null;

View file

@ -167,7 +167,7 @@ public class NewClassWizardUtil {
folder = roots[0];
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
if (folder == null) {
folder = cproject.findSourceRoot(cproject.getResource());
@ -394,7 +394,7 @@ public class NewClassWizardUtil {
index.acquireReadLock();
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return SEARCH_MATCH_ERROR;
} catch (InterruptedException e) {
}

View file

@ -342,7 +342,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
celem = projects[0];
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
}
return celem;
@ -379,7 +379,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
folder = roots[0];
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
if (folder == null) {
folder = cproject.findSourceRoot(cproject.getResource());

View file

@ -303,7 +303,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage {
return;
}
} catch (CoreException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
fCurrCProject= null;
}
fProjectStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.NotACProject")); //$NON-NLS-1$
@ -506,7 +506,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage {
try {
projects= CoreModel.create(fWorkspaceRoot).getCProjects();
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
projects= new ICProject[0];
}

View file

@ -204,7 +204,7 @@ public class TeamProjectIndexExportWizardPage extends WizardDataTransferPage im
}
}
} catch (CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
}
fProjectViewer.setInput(input);
}

View file

@ -70,7 +70,7 @@ public class CDTUIImages {
try {
return new URL(iconBaseURL, buffer.toString());
} catch (MalformedURLException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
return null;
}
}

View file

@ -134,7 +134,7 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
try {
processDelta(event.getDelta());
} catch(CModelException e) {
CUIPlugin.getDefault().log(e);
CUIPlugin.log(e);
e.printStackTrace();
}
}

View file

@ -416,7 +416,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
String id= filterDescs[i].getId();
Boolean isEnabled= new Boolean(filterDescs[i].isEnabled());
//if (fEnabledFilterIds.containsKey(id))
// CUIPlugin.getDefault().log(new Status("WARNING: Duplicate id for extension-point \"org.eclipse.jdt.ui.CElementFilters\"")); //$NON-NLS-1$
// CUIPlugin.log(new Status("WARNING: Duplicate id for extension-point \"org.eclipse.jdt.ui.CElementFilters\"")); //$NON-NLS-1$
fEnabledFilterIds.put(id, isEnabled);
fFilterDescriptorMap.put(id, filterDescs[i]);
}

View file

@ -161,7 +161,7 @@ public class OpenAction extends SelectionDispatchAction {
boolean activateOnOpen= fEditor != null ? true : OpenStrategy.activateOnOpen();
OpenActionUtil.open(element, activateOnOpen);
} catch (CModelException e) {
CUIPlugin.getDefault().log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(),
CUIPlugin.log(new Status(IStatus.ERROR, CUIPlugin.getPluginId(),
ICStatusConstants.INTERNAL_ERROR, ActionMessages.getString("OpenAction.error.message"), e)); //$NON-NLS-1$
ErrorDialog.openError(getShell(),

Some files were not shown because too many files have changed in this diff Show more