import org.simantics.scl.ui.editor.TextAndErrors;
import org.simantics.structural2.scl.procedural.CompileProceduralComponentTypeRequest;
import org.simantics.structural2.scl.procedural.ProceduralComponentTypeCompilationException;
+import org.simantics.structural2.utils.StructuralUtils;
import org.simantics.ui.workbench.ResourceEditorInput;
import org.simantics.utils.logging.TimeLogger;
import org.simantics.utils.ui.SWTUtils;
@Override
public Document perform(ReadGraph graph) throws DatabaseException {
currentText = graph.getValue(resource, Bindings.STRING);
+ immutable = StructuralUtils.isImmutable(graph, resource);
errorHappened = false;
- return new Document(currentText != null ? currentText : "");
+ return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$
}
});
} catch (DatabaseException e) {
@Override
public void exception(Throwable t) {
Activator.getDefault().getLog().log(
- new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Internal error in procedural user component code compilation.", t));
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ProceduralComponentTypeCodeDocumentProvider_ActivatorInternalErrorMsg, t));
}
@Override
@Override
protected void doSaveDocument(IProgressMonitor monitor, Object element,
IDocument document, boolean overwrite) throws CoreException {
- TimeLogger.resetTimeAndLog(getClass(), "doSaveDocument");
+ TimeLogger.resetTimeAndLog(getClass(), "doSaveDocument"); //$NON-NLS-1$
currentText = document.get();
Simantics.getSession().asyncRequest(new WriteRequest() {
@Override