Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.ISafeRunnable


  public void performDefaults() {
    restoreFromPreferences();
    for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) {
      final ISpellingPreferenceBlock block= (ISpellingPreferenceBlock) it.next();
      ISafeRunnable runnable= new ISafeRunnable() {
        public void run() throws Exception {
          block.performDefaults();
        }
        public void handleException(Throwable x) {
        }
View Full Code Here


  }

  public void dispose() {
    for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) {
      final ISpellingPreferenceBlock block= (ISpellingPreferenceBlock) it.next();
      ISafeRunnable runnable= new ISafeRunnable() {
        public void run() throws Exception {
          block.dispose();
        }
        public void handleException(Throwable x) {
        }
View Full Code Here

   */
  public AbstractHyperlinkDetector createHyperlinkDetector() throws CoreException {
    final Throwable[] exception= new Throwable[1];
    final AbstractHyperlinkDetector[] result= new AbstractHyperlinkDetector[1];
    String message= NLSUtility.format(EditorMessages.Editor_error_HyperlinkDetector_couldNotCreate_message, new String[] { getId(), fElement.getContributor().getName() });
    ISafeRunnable code= new SafeRunnable(message) {
      /*
       * @see org.eclipse.core.runtime.ISafeRunnable#run()
       */
      public void run() throws Exception {
         String pluginId = fElement.getContributor().getName();
View Full Code Here

      collector.beginCollecting();
      if (fPreferences.getBoolean(PREFERENCE_SPELLING_ENABLED))
        try {
          final ISpellingEngine engine= createEngine(fPreferences);
          if (engine != null) {
            ISafeRunnable runnable= new ISafeRunnable() {
              public void run() throws Exception {
                engine.check(document, regions, context, collector, monitor);
              }
              public void handleException(Throwable x) {
              }
View Full Code Here

        final String[] result = new String[1];

        for (final IAttributeValueResolver resolver : AttributeValueResolverRegistryReader
                .getInstance().getExtensions())
        {
            SafeRunner.run(new ISafeRunnable()
            {
                public void handleException(Throwable exception)
                {
                    PDPlugin
                            .log(
View Full Code Here

                  pairing.inserter = (AbstractCharacterPairInserter) element.createExecutableExtension("class");
                  if (pairing.inserter != null && partitions.length > 0) {
                    fPairInserter.addInserter(pairing);
                    /* use a SafeRunner since this method is also invoked during Part creation */
                    SafeRunner.run(new ISafeRunnable() {
                      public void run() throws Exception {
                        pairing.inserter.initialize();
                      }

                      public void handleException(Throwable exception) {
View Full Code Here

   * @return List of all {@link FacesConfigType} instances.
   */
  protected List<FacesConfigType> getFacesConfigModels() {
    final List<FacesConfigType> facesConfigModels = new ArrayList<FacesConfigType>();   
    for(final IJSFAppConfigProvider configProvider : getJSFAppConfigProviders()) {   
        SafeRunner.run(new ISafeRunnable() {

                public void handleException(Throwable exception) {
                    //SafeRunner will log the exception
                }

View Full Code Here

          facade.removeCompletionListener(fCompletionListener);
      }

      for (int i = 0; i < fInserters.length; i++) {
        final AbstractCharacterPairInserter inserter = fInserters[i].inserter;
        SafeRunner.run(new ISafeRunnable() {
          public void handleException(Throwable exception) {
            // rely on default logging
          }

          public void run() throws Exception {
View Full Code Here

        return;
      final boolean[] paired = { false };
      for (int i = 0; i < fInserters.length; i++) {
        final CharacterPairing pairing = fInserters[i];
        // use a SafeRunner -- this is a critical function (typing)
        SafeRunner.run(new ISafeRunnable() {
          public void run() throws Exception {
            final AbstractCharacterPairInserter inserter = pairing.inserter;
            if (inserter.hasPair(event.character)) {
              if (pair(event, inserter, pairing.partitions))
                paired[0] = true;
View Full Code Here

    if (!isCustomFilter())
      return null;

    final ViewerFilter[] result= new ViewerFilter[1];
    String message = OutlineFilterMessages.FilterDescriptor_filterCreationError_message;
    ISafeRunnable code= new SafeRunnable(message) {
      /*
       * @see org.eclipse.core.runtime.ISafeRunnable#run()
       */
      public void run() throws Exception {
        result[0]= (ViewerFilter)fElement.createExecutableExtension(CLASS_ATTRIBUTE);
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.ISafeRunnable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.