/** Cancels reloading this resource. The running parser and post processors are terminated. */ protected void cancelReload() { // Cancel parser genericity.language.gbind.IGbindTextParser parserCopy = parser; if (parserCopy != null) { parserCopy.terminate(); } // Cancel post processor(s) genericity.language.gbind.IGbindResourcePostProcessor runningPostProcessorCopy = runningPostProcessor; if (runningPostProcessorCopy != null) { runningPostProcessorCopy.terminate(); } // Cancel reference resolving genericity.language.gbind.util.GbindInterruptibleEcoreResolver interruptibleResolverCopy = interruptibleResolver; if (interruptibleResolverCopy != null) { interruptibleResolverCopy.terminate(); } }
/** Runs the given post processor to process this resource. */ protected void runPostProcessor( genericity.language.gbind.IGbindResourcePostProcessor postProcessor) { try { this.runningPostProcessor = postProcessor; postProcessor.process(this); } catch (Exception e) { new genericity.language.gbind.util.GbindRuntimeUtil() .logError("Exception while running a post-processor.", e); } this.runningPostProcessor = null; }