Tabnine Logo
EMFWorkbenchResourceHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
EMFWorkbenchResourceHandler
in
org.eclipse.jem.internal.util.emf.workbench.nls

Best Java code snippets using org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler (Showing top 14 results out of 315)

origin: org.eclipse/org.eclipse.jem.util

public static String getString(String key, Object[] args, int x) {

    return getString(key);
  }
}
origin: org.eclipse/org.eclipse.jem.util

  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) {
origin: org.eclipse/org.eclipse.jem.util

public static String getString(String key, Object[] args) {

  try {return MessageFormat.format(getString(key), args);}
  catch (IllegalArgumentException e) {return getString(key);}

}
public static String getString(String key, Object[] args, int x) {
origin: org.eclipse/org.eclipse.jem.util

/**
 * 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$
}
origin: org.eclipse/org.eclipse.jem.util

/**
 * 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;
}
origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

public void complain(Object accessorKey) {
  throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$
}
origin: org.eclipse/org.eclipse.jem.util

/**
 * 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);
}
origin: org.eclipse/org.eclipse.jem.util

/**
 * @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$
}
origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

public synchronized void assertAccess(Object accessorKey) {
  if (!isClientAccessing(accessorKey))
    throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$
}
origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

/**
 * 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?"
}
origin: org.eclipse/org.eclipse.jem.util

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$
origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

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$
}
origin: org.eclipse/org.eclipse.jem.util

/**
 * 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;
}

origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

/**
 * 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."
}
org.eclipse.jem.internal.util.emf.workbench.nlsEMFWorkbenchResourceHandler

Most used methods

  • getString
  • getResourceBundle
    Returns the resource bundle used by all classes in this Project

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now