public static String getString(String key, Object[] args, int x) { return getString(key); } }
public static String getString(String key) { if (fgResourceBundle == null) { fgResourceBundle= getResourceBundle(); } if (fgResourceBundle != null) { try { return fgResourceBundle.getString(key); } catch (MissingResourceException e) { return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$ } } else { return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$ } } public static String getString(String key, Object[] args) {
/** * Delete the file associated with the resource. * * @param resource * * @since 1.0.0 */ public void deleteFile(Resource resource) { throw new UnsupportedOperationException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_0")); //$NON-NLS-1$ }
/** * Construct with a project. * * @param aProject * * @since 1.0.0 */ public EMFWorkbenchContextBase(IProject aProject) { if (aProject == null) throw new IllegalArgumentException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_1")); //$NON-NLS-1$ project = aProject; }
public void complain(Object accessorKey) { throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$ }
/** * Create the resource set. By default it is a ProjectResourceSetImpl. * * @return project's new resource set. * * @since 1.0.0 */ protected ProjectResourceSet createResourceSet() { if (project == null) throw new IllegalStateException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_2")); //$NON-NLS-1$ return new ProjectResourceSetImpl(project); }
/** * @param natureId */ private void registerNatureID(String natureId) { if (!REGISTERED_NATURE_IDS.contains(natureId)) REGISTERED_NATURE_IDS.add(natureId); else Logger.getLogger().logError(EMFWorkbenchResourceHandler.getString("EMFNatureRegistry_ERROR_0", new Object[] {natureId})); //$NON-NLS-1$ }
public synchronized void assertAccess(Object accessorKey) { if (!isClientAccessing(accessorKey)) throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$ }
/** * Prompt for a save. */ protected boolean promptToSave(IOperationHandler operationHandler) { if (operationHandler == null) return false; return operationHandler.canContinue(EMFWorkbenchResourceHandler.getString("The_following_resources_ne_UI_"), getResourceURIs(true)); //$NON-NLS-1$ = "The following resources need to be saved but are currently shared, do you want to save now?" }
public void complain(Object accessorKey) { if (!isStable()) throw new ClientAccessRegistryException(this.registry, this.baseSet); throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$ }
if (root.isDirectory()) { File[] files = root.listFiles(); monitor.beginTask(MessageFormat.format(EMFWorkbenchResourceHandler.getString("ProjectUtil_Delete_1"), new Object[] {root.getName()}), files.length+(deleteRoot ? 1 : 0)); //$NON-NLS-1$ for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) monitor.beginTask(MessageFormat.format(EMFWorkbenchResourceHandler.getString("ProjectUtil_Delete_1"), new Object[] {root.getName()}), 1); //$NON-NLS-1$
/** * Return a new or existing EMFNature on <code>aProject</code>. Allow the <code>contributor</code> * to contribute to the new or existing nature prior to returning. */ public EMFWorkbenchContextBase createEMFContext(IProject aProject, IEMFContextContributor contributor) { if (aProject == null) throw new IllegalStateException("[EMFWorkbenchContextBase]" + EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextFactory_UI_0")); //$NON-NLS-1$ //$NON-NLS-2$ if (!aProject.isAccessible()) throw new IllegalStateException("[EMFWorkbenchContextBase]" + EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextFactory_UI_1", new Object[]{aProject.getName()})); //$NON-NLS-1$ //$NON-NLS-2$ EMFWorkbenchContextBase context = getCachedEMFContext(aProject); boolean contributorFound = false; if (context == null) { context = primCreateEMFContext(aProject); cacheEMFContext(aProject, context); contributorFound = initializeEMFContextFromContributors(aProject, context, contributor); } if (contributor != null && context != null && !contributorFound) contributor.primaryContributeToContext(context); return context; }
/** * Handle the failure of * * @aResource. */ protected void primHandleSaveFailed(Resource aResource, Exception e) { org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e); Exception nested = null; if (e instanceof IWFTWrappedException) nested = ((IWFTWrappedException) e).getNestedException(); else nested = e; throw new SaveFailedException(EMFWorkbenchResourceHandler.getString("An_error_occurred_while_sa_ERROR_"), nested); //$NON-NLS-1$ = "An error occurred while saving." }