public Browser createBrowser(Composite parent) {
try {
- browser = new Browser(parent, SWT.MOZILLA);
+ browser = new Browser(parent, SWT.WEBKIT);
} catch (SWTError e) {
//System.out.println("Could not instantiate Browser: " + e.getMessage());
browser = new Browser(parent, SWT.NONE);
/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2020 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
import org.simantics.db.common.ResourceArray;
import org.simantics.db.common.procedure.adapter.DisposableListener;
import org.simantics.db.common.request.UnaryRead;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.SelectionHints;
import org.simantics.db.layer0.request.PossibleURI;
import org.simantics.utils.ui.ErrorLogger;
import org.simantics.utils.ui.ISelectionUtils;
import org.simantics.utils.ui.PathUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*/
public class VariableDebugger extends Composite {
+ private static final Logger LOGGER = LoggerFactory.getLogger(VariableDebugger.class);
+
public interface HistoryListener {
void historyChanged();
}
@Override
public void exception(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("Page content listener failed unexpectedly", t);
}
}
@Override
public void drop(DropTargetEvent event) {
label.setBackground(null);
+ String uri = null;
try {
- String uri = parseUri(event);
+ uri = parseUri(event);
if (uri == null) {
event.detail = DND.DROP_NONE;
return;
}
changeLocation(uri);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Changing location to URI {} failed", uri, e);
}
}
@Override
public void widgetSelected(SelectionEvent e) {
+ String uri = null;
try {
- String uri = text.getText();
+ uri = text.getText();
// Make sure that URI is resolvable to Variable
session.sync(new ResourceURIToVariable(uri));
changeLocation(uri);
} catch (DatabaseException e1) {
- Logger.defaultLogError(e1);
+ LOGGER.error("Lookup failed for URI {}", uri, e1);
}
}
public Browser createBrowser(Composite parent) {
try {
- browser = new Browser(parent, SWT.MOZILLA);
+ browser = new Browser(parent, SWT.NONE);
} catch (SWTError e) {
//System.out.println("Could not instantiate Browser: " + e.getMessage());
browser = new Browser(parent, SWT.NONE);
else return value != null ? getValue(graph, r, value) : "null"; //$NON-NLS-1$
} catch (Throwable e) {
try {
- Logger.defaultLogError("getValue " + r.getURI(graph), e); //$NON-NLS-1$
+ LOGGER.error("getValue({})", r.getURI(graph), e); //$NON-NLS-1$
} catch (DatabaseException e1) {
- Logger.defaultLogError(e1);
+ LOGGER.error("Failed to get URI for problematic value variable", e1);
}
return e.getMessage();
}
String encoded = Base64.encode(uri.getBytes(utf8));
return encoded;
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Failed to construct link string for variable", e); //$NON-NLS-1$
return e.getMessage();
}
}
String rviString = getRVIString(graph, var);
Object node = null;
if(var instanceof AbstractChildVariable) {
- VariableNode vn = ((AbstractChildVariable)var).node;
+ VariableNode<?> vn = ((AbstractChildVariable)var).node;
if(vn != null) node = vn.node;
}
if(var instanceof AbstractPropertyVariable) {
- VariableNode vn = ((AbstractPropertyVariable)var).node;
+ VariableNode<?> vn = ((AbstractPropertyVariable)var).node;
if(vn != null) node = vn.node;
}
id="tspan6235"
x="4.0821486"
y="291.79337"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.6444446px;font-family:'Cascadia Code';-inkscape-font-specification:'Cascadia Code, Normal';fill:#ffffff;fill-opacity:1;stroke-width:0.26458335px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">1.42.0</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.6444446px;font-family:'Cascadia Code';-inkscape-font-specification:'Cascadia Code, Normal';fill:#ffffff;fill-opacity:1;stroke-width:0.26458335px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">1.43.0</tspan></text>
<circle
style="opacity:0.92900002;fill:#5d6b91;fill-opacity:1;stroke:none;stroke-width:1.27400005;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter6809)"
id="path6231"
Label label = new Label(buttonComposite, SWT.NONE);
Button newButton = createButton(buttonComposite,
- IDialogConstants.INTERNAL_ID-1, org.simantics.modeling.ui.actions.WorkbenchMessages.AssignSymbolGroupsDialog_New, false);
+ IDialogConstants.INTERNAL_ID-1, org.simantics.modeling.ui.actions.Messages.AssignSymbolGroupsDialog_New, false);
listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
newButton.addSelectionListener(listener);
Button removeButton = createButton(buttonComposite,
- IDialogConstants.INTERNAL_ID-2, org.simantics.modeling.ui.actions.WorkbenchMessages.AssignSymbolGroupsDialog_Remove, false);
+ IDialogConstants.INTERNAL_ID-2, org.simantics.modeling.ui.actions.Messages.AssignSymbolGroupsDialog_Remove, false);
listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
public static String AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolsAreShownIn;
public static String AssignSymbolGroup_SymbolGroupAssignments;
public static String AssignSymbolGroup_WriteSymbolGroupName;
+ public static String AssignSymbolGroupsDialog_New;
+ public static String AssignSymbolGroupsDialog_Remove;
public static String CompilePGraphsAction_CompilePGraphs;
public static String CompilePGraphsAction_Continue;
public static String CompilePGraphsAction_FollowingIssuesFound;
+++ /dev/null
-package org.simantics.modeling.ui.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class WorkbenchMessages extends NLS {
- private static final String BUNDLE_NAME = "org.simantics.modeling.ui.actions.messages"; //$NON-NLS-1$
- public static String AssignSymbolGroupsDialog_New;
- public static String AssignSymbolGroupsDialog_Remove;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, WorkbenchMessages.class);
- }
-
- private WorkbenchMessages() {
- }
-}
import org.simantics.scl.osgi.internal.Activator;
import org.simantics.scl.osgi.internal.ServiceBasedModuleSourceRepository;
import org.simantics.scl.osgi.internal.ServiceBasedTestRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.procedure.TObjectProcedure;
public class SCLOsgi {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SCLOsgi.class);
+
private SCLOsgi() {}
public static ModuleSourceRepository SOURCE_REPOSITORY = new ServiceBasedModuleSourceRepository(Activator.getContext());
}
});
}
-
+
public static String compileAllModules() {
ArrayList<String> modulesWithErrors = new ArrayList<String>();
SCLOsgi.SOURCE_REPOSITORY.forAllModules(new TObjectProcedure<String>() {
@Override
public boolean execute(String moduleName) {
- System.out.print(moduleName);
- System.out.print(" - ");
Failable<Module> module = SCLOsgi.MODULE_REPOSITORY.getModule(moduleName);
if(module.didSucceed())
- System.out.println("succeeded");
+ LOGGER.trace("{} - {}", moduleName, "succeeded");
else if(module == DoesNotExist.INSTANCE)
- System.out.println("does not exist"); // should not happen
+ LOGGER.trace("{} - {}", moduleName, "does not exist"); // should not happen
else {
- System.out.println("error");
+ LOGGER.trace("{} - {}", moduleName, "error");
modulesWithErrors.add(moduleName);
}
return true;
<feature
id="org.simantics.sdk"
label="Simantics SDK"
- version="1.42.0.qualifier"
+ version="1.43.0.qualifier"
provider-name="VTT Technical Research Centre of Finland">
<description url="http://www.example.com/description">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Simantics 1.42.0" sequenceNumber="1579509507">
+<target name="Simantics 1.43.0" sequenceNumber="1579509507">
<locations>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
-target "Simantics 1.42.0"
+target "Simantics 1.43.0"
with source allEnvironments
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>org.simantics.sdk.repository</artifactId>
- <version>1.42.0-SNAPSHOT</version>
+ <version>1.43.0-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<parent>