Refine search
String msg = NLS.bind(PrefsMessages.preferences_fileNotFound, path.toOSString()); throw new CoreException(new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, 1, msg, null)); service.importPreferences(input); } catch (FileNotFoundException e) { String msg = NLS.bind(PrefsMessages.preferences_fileNotFound, path.toOSString()); throw new CoreException(new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, 1, msg, e)); } finally { if (input != null)
public Plugin(IPluginDescriptor descriptor) { Assert.isNotNull(descriptor); Assert.isTrue(!CompatibilityHelper.hasPluginObject(descriptor), NLS.bind(Messages.plugin_deactivatedLoad, this.getClass().getName(), descriptor.getUniqueIdentifier() + " is not activated")); //$NON-NLS-1$ this.descriptor = descriptor; InternalPlatform.start(bundle); } catch (BundleException e) { String message = NLS.bind(Messages.plugin_startupProblems, descriptor.getUniqueIdentifier()); IStatus status = new Status(IStatus.ERROR, Platform.PI_RUNTIME, IStatus.ERROR, message, e); InternalPlatform.getDefault().log(status);
@Override public IStatus validateInstallLocation(File installLocation) { if (installLocation.exists()) { return new Status(IStatus.INFO, LaunchingPlugin.ID_PLUGIN, LaunchingMessages.EEVMType_4); } return new Status(IStatus.ERROR, LaunchingPlugin.ID_PLUGIN, NLS.bind(LaunchingMessages.EEVMType_3, new String[]{installLocation.getPath()})); }
private IStatus validateState(String id, long timestamp) { long[] states = listProfileTimestamps(id); for (long ts : states) if (ts == timestamp) return Status.OK_STATUS; return new Status(IStatus.ERROR, EngineActivator.ID, (NLS.bind(Messages.SimpleProfileRegistry_state_not_found, timestamp, id))); }
@Override protected void onClose(String digestString) { // if the hashes don't line up set the status to error. if (!digestString.equals(expectedMD5)) setStatus(new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_MD5_NOT_MATCH, NLS.bind(Messages.Error_unexpected_hash, expectedMD5, digestString), null)); } }
/** * @param baseline the baseline that is disposed * @throws CoreException with the baseline disposed information */ protected void baselineDisposed(IApiBaseline baseline) throws CoreException { throw new CoreException(new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, ApiPlugin.REPORT_BASELINE_IS_DISPOSED, NLS.bind(Messages.BundleApiComponent_baseline_disposed, baseline.getName()), null)); } }
@Override final protected void onClose(String digestString) { // if the hashes don't line up set the status to error. if (!digestString.equals(expectedChecksum)) // TODO like ProvisionException.ARTIFACT_MD5_NOT_MATCH but for any checksum setStatus(new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_MD5_NOT_MATCH, NLS.bind(Messages.Error_unexpected_checksum, new Object[] {algorithmName, expectedChecksum, digestString}), null)); }
public void move(IPath oldPath, IPath newPath) throws CoreException { File oldFile = getFile(oldPath, false); // TODO lock hierarchy and throw an exception if oldFile is in use if (oldFile.exists()) { File newFile = getFile(newPath, false); newFile.getParentFile().mkdirs(); if (!oldFile.renameTo(newFile)) { throw new CoreException(new Status(IStatus.ERROR, CommonsCorePlugin.ID_PLUGIN, NLS.bind( "The target path ''{0}'' already exists", newPath))); //$NON-NLS-1$ } } }
@Override public IStatus toStatus() { if (isEntryPoint) { return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRootRequired, req)); } if (req.getFilter() == null) { return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequired, getUserReadableName(iu), req)); } return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {req.getFilter(), getUserReadableName(iu), req})); } }
private void endSnapshotLocation(String elementName) { if (elementName.equals(SNAPSHOT_LOCATION)) { String location = charBuffer.toString().trim(); try { projectDescription.setSnapshotLocationURI(new URI(location)); } catch (URISyntaxException e) { String msg = NLS.bind(Messages.projRead_badSnapshotLocation, location); problems.add(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, msg, e)); } state = S_PROJECT_DESC; } }
/** * @see ErrorHandler#fatalError(SAXParseException) */ @Override public void fatalError(SAXParseException error) throws SAXException { // ensure a null value is not passed as message to Status constructor (bug 42782) String message = error.getMessage(); if (project != null) message = NLS.bind(Messages.resources_readMeta, project.getName()); problems.add(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, message == null ? "" : message, error)); //$NON-NLS-1$ throw error; }
protected void log(Exception ex) { String message = ex.getMessage(); if (project != null) message = NLS.bind(Messages.resources_readMeta, project.getName()); problems.add(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, message == null ? "" : message, ex)); //$NON-NLS-1$ }
protected void validate() { String name = fName.getText().trim(); if (name.length() == 0) { updateStatus(new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, PDEUIMessages.PropertiesSection_ErrorPropertyNoName)); } else if (fExistingNames.contains(name)) { updateStatus(new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, NLS.bind(PDEUIMessages.PropertiesSection_ErrorPropertyExists, name))); } else { updateStatus(Status.OK_STATUS); } }
protected void log(Exception ex) { String message = ex.getMessage(); if (project != null) message = NLS.bind(Messages.resources_readMeta, project.getName()); problems.add(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, message == null ? "" : message, ex)); //$NON-NLS-1$ }