Label packageLabel= new Label(composite, SWT.NONE); packageLabel.setText(PreferencesMessages.JavaElementInfoPage_location); String location= Resources.getLocationString(((IJavaProject)element).getProject()); if (location != null) { Label packageName= new Label(composite, SWT.NONE);
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, Messages.format(JarPackagerMessages.JarFileExportOperation_errorCannotCloseConnection, Resources.getLocationString(classFile)), e)); Resources.getLocationString(classFile)), null); return null;
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, Messages.format(JarPackagerMessages.JarFileExportOperation_errorCannotCloseConnection, BasicElementLabels.getURLPart(Resources.getLocationString(classFile))), e)); BasicElementLabels.getURLPart(Resources.getLocationString(classFile))), null); return null;
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, Messages.format(JarPackagerMessages.JarFileExportOperation_errorCannotCloseConnection, BasicElementLabels.getURLPart(Resources.getLocationString(classFile))), e)); BasicElementLabels.getURLPart(Resources.getLocationString(classFile))), null); return null;
private void checkLocationDeleted(IProject project) throws CoreException { if (!project.exists()) return; URI location= project.getLocationURI(); if (location == null) return; IFileStore store= EFS.getStore(location); if (!store.fetchInfo().exists()) { final String message = Messages.format( ActionMessages.RefreshAction_locationDeleted_message, new Object[] { project.getName(), Resources.getLocationString(project) }); final boolean[] result= new boolean[1]; // Must prompt user in UI thread (we're in the operation thread here). getShell().getDisplay().syncExec(new Runnable() { public void run() { result[0]= MessageDialog.openQuestion(getShell(), ActionMessages.RefreshAction_locationDeleted_title, message); } }); if (result[0]) { project.delete(true, true, null); } } } }
status.setError(Messages.format( NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, BasicElementLabels.getURLPart(Resources.getLocationString(resource))));
status.setError(Messages.format( NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, BasicElementLabels.getURLPart(Resources.getLocationString(resource))));
status.setError(Messages.format( NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, Resources.getLocationString(resource)));
status.setError(Messages.format( NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, Resources.getLocationString(resource)));