fix #33
This commit is contained in:
parent
e88014ebba
commit
19ea1f0b6d
|
@ -1,46 +1,104 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
|
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
|
||||||
<booleanAttribute key="append.args" value="true"/>
|
<booleanAttribute key="append.args" value="true"/>
|
||||||
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
|
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
|
||||||
<booleanAttribute key="askclear" value="false"/>
|
<booleanAttribute key="askclear" value="false"/>
|
||||||
<booleanAttribute key="automaticAdd" value="true"/>
|
<booleanAttribute key="automaticAdd" value="true"/>
|
||||||
<booleanAttribute key="automaticValidate" value="false"/>
|
<booleanAttribute key="automaticValidate" value="false"/>
|
||||||
<stringAttribute key="bootstrap" value=""/>
|
<stringAttribute key="bootstrap" value=""/>
|
||||||
<stringAttribute key="checked" value="[NONE]"/>
|
<stringAttribute key="checked" value="[NONE]"/>
|
||||||
<booleanAttribute key="clearConfig" value="true"/>
|
<booleanAttribute key="clearConfig" value="true"/>
|
||||||
<booleanAttribute key="clearws" value="true"/>
|
<booleanAttribute key="clearws" value="true"/>
|
||||||
<booleanAttribute key="clearwslog" value="false"/>
|
<booleanAttribute key="clearwslog" value="false"/>
|
||||||
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
|
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
|
||||||
<booleanAttribute key="default" value="true"/>
|
<booleanAttribute key="default" value="true"/>
|
||||||
<stringAttribute key="deselected_workspace_plugins" value="com.minres.scviewer.e4.application,com.minres.scviewer.ui"/>
|
<setAttribute key="deselected_workspace_bundles">
|
||||||
<booleanAttribute key="includeOptional" value="true"/>
|
<setEntry value="com.minres.scviewer.e4.application"/>
|
||||||
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
|
<setEntry value="com.minres.scviewer.ui"/>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
</setAttribute>
|
||||||
<listEntry value="/com.minres.scviewer.database.test"/>
|
<booleanAttribute key="includeOptional" value="true"/>
|
||||||
</listAttribute>
|
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
<listEntry value="4"/>
|
<listEntry value="/com.minres.scviewer.database.test"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
<listEntry value="4"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
|
||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
|
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
|
||||||
<stringAttribute key="pde.version" value="3.3"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
|
||||||
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
|
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||||
<booleanAttribute key="run_in_ui_thread" value="true"/>
|
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
|
||||||
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.jxpath@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.hamcrest.core@default:default,org.junit@default:default"/>
|
<stringAttribute key="pde.version" value="3.3"/>
|
||||||
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:true,com.minres.scviewer.database.test@default:default,com.minres.scviewer.database.text@default:true,com.minres.scviewer.database.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:true,com.opcoach.e4.preferences@default:default"/>
|
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
|
||||||
<booleanAttribute key="show_selected_only" value="false"/>
|
<booleanAttribute key="run_in_ui_thread" value="true"/>
|
||||||
<booleanAttribute key="tracing" value="false"/>
|
<setAttribute key="selected_target_bundles">
|
||||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
<setEntry value="com.google.guava@default:default"/>
|
||||||
<booleanAttribute key="useDefaultConfig" value="true"/>
|
<setEntry value="javax.annotation@default:default"/>
|
||||||
<booleanAttribute key="useDefaultConfigArea" value="false"/>
|
<setEntry value="javax.inject@default:default"/>
|
||||||
<booleanAttribute key="useProduct" value="false"/>
|
<setEntry value="javax.servlet@default:default"/>
|
||||||
|
<setEntry value="org.apache.ant@default:default"/>
|
||||||
|
<setEntry value="org.apache.commons.jxpath@default:default"/>
|
||||||
|
<setEntry value="org.apache.felix.gogo.command@default:default"/>
|
||||||
|
<setEntry value="org.apache.felix.gogo.runtime@default:default"/>
|
||||||
|
<setEntry value="org.codehaus.groovy@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.ant.core@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.commands@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.contenttype@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.expressions@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.filesystem.macosx@default:false"/>
|
||||||
|
<setEntry value="org.eclipse.core.filesystem@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.jobs@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.resources@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.core.runtime@default:true"/>
|
||||||
|
<setEntry value="org.eclipse.core.variables@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.core.contexts@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.core.di.annotations@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.core.di.extensions@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.core.di@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.core.services@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.emf.xpath@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.ui.di@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.ui.model.workbench@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.e4.ui.services@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.emf.common@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.emf.ecore@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.app@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.bidi@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.common@2:true"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.ds@1:true"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.preferences@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.registry@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.equinox.util@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.jface@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
|
||||||
|
<setEntry value="org.eclipse.osgi.services@default:default"/>
|
||||||
|
<setEntry value="org.eclipse.osgi@-1:true"/>
|
||||||
|
<setEntry value="org.eclipse.swt.cocoa.macosx.x86_64@default:false"/>
|
||||||
|
<setEntry value="org.eclipse.swt@default:default"/>
|
||||||
|
<setEntry value="org.hamcrest.core@default:default"/>
|
||||||
|
<setEntry value="org.junit@default:default"/>
|
||||||
|
</setAttribute>
|
||||||
|
<setAttribute key="selected_workspace_bundles">
|
||||||
|
<setEntry value="com.minres.scviewer.database.sqlite@default:true"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database.test@default:default"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database.text@default:true"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database.ui.swt@default:default"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database.ui@default:default"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database.vcd@default:default"/>
|
||||||
|
<setEntry value="com.minres.scviewer.database@default:true"/>
|
||||||
|
<setEntry value="com.opcoach.e4.preferences@default:default"/>
|
||||||
|
</setAttribute>
|
||||||
|
<booleanAttribute key="show_selected_only" value="false"/>
|
||||||
|
<booleanAttribute key="tracing" value="false"/>
|
||||||
|
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||||
|
<booleanAttribute key="useDefaultConfig" value="true"/>
|
||||||
|
<booleanAttribute key="useDefaultConfigArea" value="false"/>
|
||||||
|
<booleanAttribute key="useProduct" value="false"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
||||||
Bundle-Version: 2.5.0.qualifier
|
Bundle-Version: 2.6.0.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.core.runtime;bundle-version="3.11.1",
|
org.eclipse.core.runtime;bundle-version="3.11.1",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>com.minres.scviewer.e4.application</artifactId>
|
<artifactId>com.minres.scviewer.e4.application</artifactId>
|
||||||
<version>2.5.0-SNAPSHOT</version>
|
<version>2.6.0-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n
|
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n
|
||||||
AboutDialog_1=\nCopyright (c) 2015, 2019 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP-Tools/SCViewer and the master branch is mirrored to GitHub: https://github.com/minres/SCViewer\n
|
AboutDialog_1=\nCopyright (c) 2015, 2019, 2020 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP-Tools/SCViewer and the master branch is mirrored to GitHub: https://github.com/minres/SCViewer\n
|
||||||
DesignBrowser_12=Append all after
|
DesignBrowser_12=Append all after
|
||||||
DesignBrowser_16=Insert all before
|
DesignBrowser_16=Insert all before
|
||||||
DesignBrowser_2=Enter text to filter waveforms
|
DesignBrowser_2=Enter text to filter waveforms
|
||||||
|
|
|
@ -328,6 +328,7 @@ public class DesignBrowser {
|
||||||
*/
|
*/
|
||||||
@Focus
|
@Focus
|
||||||
public void setFocus() {
|
public void setFocus() {
|
||||||
|
if(txTableViewer!=null) {
|
||||||
txTableViewer.getTable().setFocus();
|
txTableViewer.getTable().setFocus();
|
||||||
IStructuredSelection selection = (IStructuredSelection)txTableViewer.getSelection();
|
IStructuredSelection selection = (IStructuredSelection)txTableViewer.getSelection();
|
||||||
if(selection.size()==0){
|
if(selection.size()==0){
|
||||||
|
@ -335,6 +336,7 @@ public class DesignBrowser {
|
||||||
}
|
}
|
||||||
selectionService.setSelection(selection);
|
selectionService.setSelection(selection);
|
||||||
thisSelectionCount=selection.toList().size();
|
thisSelectionCount=selection.toList().size();
|
||||||
|
}
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,14 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.e4.application.parts;
|
package com.minres.scviewer.e4.application.parts;
|
||||||
|
|
||||||
|
import java.util.AbstractMap;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.regex.PatternSyntaxException;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -477,12 +483,19 @@ public class TransactionDetails {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(element instanceof ITxAttribute){
|
if(element instanceof ITxAttribute){
|
||||||
|
try {
|
||||||
return (((ITxAttribute) element).getName().toLowerCase().matches(searchString.toLowerCase()));
|
return (((ITxAttribute) element).getName().toLowerCase().matches(searchString.toLowerCase()));
|
||||||
|
} catch (PatternSyntaxException e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(element instanceof Object[]) {
|
if(element instanceof Object[]) {
|
||||||
|
try {
|
||||||
return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
|
return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
|
||||||
|
} catch (PatternSyntaxException e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,11 +503,13 @@ public class TransactionDetails {
|
||||||
/**
|
/**
|
||||||
* The Enum Type.
|
* The Enum Type.
|
||||||
*/
|
*/
|
||||||
enum Type {/** The props. */
|
enum Type {
|
||||||
PROPS, /** The attrs. */
|
PROPS, /** The props. */
|
||||||
ATTRS, /** The in rel. */
|
ATTRS, /** The attrs. */
|
||||||
IN_REL, /** The out rel. */
|
IN_REL, /** The in rel. */
|
||||||
OUT_REL}
|
OUT_REL,/** The out rel. */
|
||||||
|
HIER
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class TreeNode.
|
* The Class TreeNode.
|
||||||
|
@ -507,6 +522,7 @@ public class TransactionDetails {
|
||||||
/** The element. */
|
/** The element. */
|
||||||
public ITx element;
|
public ITx element;
|
||||||
|
|
||||||
|
private String hier_path;
|
||||||
/**
|
/**
|
||||||
* Instantiates a new tree node.
|
* Instantiates a new tree node.
|
||||||
*
|
*
|
||||||
|
@ -516,6 +532,13 @@ public class TransactionDetails {
|
||||||
public TreeNode(ITx element, Type type){
|
public TreeNode(ITx element, Type type){
|
||||||
this.element=element;
|
this.element=element;
|
||||||
this.type=type;
|
this.type=type;
|
||||||
|
this.hier_path="";
|
||||||
|
}
|
||||||
|
|
||||||
|
public TreeNode(ITx element, String path){
|
||||||
|
this.element=element;
|
||||||
|
this.type=Type.HIER;
|
||||||
|
this.hier_path=path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -527,9 +550,33 @@ public class TransactionDetails {
|
||||||
case ATTRS: return Messages.TransactionDetails_11;
|
case ATTRS: return Messages.TransactionDetails_11;
|
||||||
case IN_REL: return Messages.TransactionDetails_12;
|
case IN_REL: return Messages.TransactionDetails_12;
|
||||||
case OUT_REL: return Messages.TransactionDetails_13;
|
case OUT_REL: return Messages.TransactionDetails_13;
|
||||||
|
case HIER:{
|
||||||
|
String[] tokens = hier_path.split("\\.");
|
||||||
|
return tokens[tokens.length-1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object[] getAttributeListForHier() {
|
||||||
|
if(childs==null) {
|
||||||
|
Map<String, Object> res = element.getAttributes().stream()
|
||||||
|
.filter(txAttr -> txAttr.getName().startsWith(hier_path))
|
||||||
|
.map(txAttr -> {
|
||||||
|
String target = hier_path.length()==0?txAttr.getName():txAttr.getName().replace(hier_path+'.', "");
|
||||||
|
String[] tokens = target.split("\\.");
|
||||||
|
if(tokens.length==1)
|
||||||
|
return new AbstractMap.SimpleEntry<>(tokens[0], txAttr);
|
||||||
|
else
|
||||||
|
return new AbstractMap.SimpleEntry<>(tokens[0], new TreeNode(element, hier_path.length()>0?hier_path+"."+tokens[0]:tokens[0]));
|
||||||
|
})
|
||||||
|
.collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue(), (first, second) -> first));
|
||||||
|
childs = new TreeMap<String, Object>(res).values().toArray();
|
||||||
|
}
|
||||||
|
return childs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object[] childs=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -577,8 +624,8 @@ public class TransactionDetails {
|
||||||
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getBeginTime())},
|
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getBeginTime())},
|
||||||
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getEndTime())}
|
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getEndTime())}
|
||||||
};
|
};
|
||||||
}else if(propertyHolder.type == Type.ATTRS)
|
}else if(propertyHolder.type == Type.ATTRS || propertyHolder.type == Type.HIER)
|
||||||
return propertyHolder.element.getAttributes().toArray();
|
return propertyHolder.getAttributeListForHier();
|
||||||
else if(propertyHolder.type == Type.IN_REL){
|
else if(propertyHolder.type == Type.IN_REL){
|
||||||
Vector<Object[] > res = new Vector<>();
|
Vector<Object[] > res = new Vector<>();
|
||||||
for(ITxRelation rel:propertyHolder.element.getIncomingRelations()){
|
for(ITxRelation rel:propertyHolder.element.getIncomingRelations()){
|
||||||
|
@ -655,7 +702,8 @@ public class TransactionDetails {
|
||||||
case NAME:
|
case NAME:
|
||||||
if (element instanceof ITxAttribute) {
|
if (element instanceof ITxAttribute) {
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
return new StyledString(attribute.getName());
|
String[] tokens = attribute.getName().split("\\.");
|
||||||
|
return new StyledString(tokens[tokens.length-1]);
|
||||||
}else if (element instanceof ITxRelation) {
|
}else if (element instanceof ITxRelation) {
|
||||||
return new StyledString(Messages.TransactionDetails_4);
|
return new StyledString(Messages.TransactionDetails_4);
|
||||||
}else if(element instanceof Object[]){
|
}else if(element instanceof Object[]){
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.5.0-SNAPSHOT</version>
|
<version>2.6.0-SNAPSHOT</version>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?pde version="3.5"?>
|
<?pde version="3.5"?>
|
||||||
|
|
||||||
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.5.0.qualifier" useFeatures="false" includeLaunchers="true">
|
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.6.0.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
<plugin id="com.minres.scviewer.database.vcd"/>
|
<plugin id="com.minres.scviewer.database.vcd"/>
|
||||||
<plugin id="com.minres.scviewer.e4.application"/>
|
<plugin id="com.minres.scviewer.e4.application"/>
|
||||||
<plugin id="com.opcoach.e4.preferences"/>
|
<plugin id="com.opcoach.e4.preferences"/>
|
||||||
|
<plugin id="com.opcoach.e4.preferences.mainmenu"/>
|
||||||
<plugin id="javax.annotation"/>
|
<plugin id="javax.annotation"/>
|
||||||
<plugin id="javax.inject"/>
|
<plugin id="javax.inject"/>
|
||||||
<plugin id="org.apache.batik.constants"/>
|
<plugin id="org.apache.batik.constants"/>
|
||||||
|
@ -113,7 +114,6 @@
|
||||||
<plugin id="org.eclipse.equinox.app"/>
|
<plugin id="org.eclipse.equinox.app"/>
|
||||||
<plugin id="org.eclipse.equinox.common"/>
|
<plugin id="org.eclipse.equinox.common"/>
|
||||||
<plugin id="org.eclipse.equinox.concurrent"/>
|
<plugin id="org.eclipse.equinox.concurrent"/>
|
||||||
<plugin id="org.eclipse.equinox.ds"/>
|
|
||||||
<plugin id="org.eclipse.equinox.event"/>
|
<plugin id="org.eclipse.equinox.event"/>
|
||||||
<plugin id="org.eclipse.equinox.preferences"/>
|
<plugin id="org.eclipse.equinox.preferences"/>
|
||||||
<plugin id="org.eclipse.equinox.registry"/>
|
<plugin id="org.eclipse.equinox.registry"/>
|
||||||
|
|
Loading…
Reference in New Issue