Some minor cleanup
This commit is contained in:
parent
37ee5bd5e6
commit
a76c99dfb9
|
@ -1,6 +1,6 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Sqlite transaction database
|
||||
Bundle-Name: SQLite transaction database
|
||||
Bundle-SymbolicName: com.minres.scviewer.database.sqlite
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: MINRES Technologies GmbH
|
||||
|
|
|
@ -12,7 +12,10 @@ a SQLite based recording as well as the built-in text base recording.
|
|||
|
||||
<copyright>
|
||||
Copyright (c) 2015 MINRES Technologies GmbH.
|
||||
All rights reserved. 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
|
||||
All rights reserved. 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
|
||||
</copyright>
|
||||
|
||||
<license url="%licenseURL">
|
||||
|
|
|
@ -4,6 +4,5 @@
|
|||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="swing2swt.jar"/>
|
||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: Graph
|
|||
Bundle-SymbolicName: com.minres.scviewer.ui;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin
|
||||
Bundle-Vendor: ITJW
|
||||
Bundle-Vendor: MINRES Technologies GmbH
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.jface.text,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 983 B |
Binary file not shown.
After Width: | Height: | Size: 118 B |
|
@ -21,7 +21,8 @@
|
|||
class="com.minres.scviewer.ui.TxEditorPart"
|
||||
contributorClass="com.minres.scviewer.ui.TxEditorActionBarContributor"
|
||||
extensions="txdb"
|
||||
icon="icons/sample.gif"
|
||||
filenames="*.txdb,*.txlog"
|
||||
icon="icons/scviewer.gif"
|
||||
id="com.minres.scviewer.ui.TxEditorPart"
|
||||
name="Wave Viewer">
|
||||
</editor>
|
||||
|
|
|
@ -136,10 +136,10 @@ public class TxEditorPart extends EditorPart implements ITabbedPropertySheetPage
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (InvalidSyntaxException e) {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
|
||||
"Error loading database", "Could not find database loader implementation");
|
||||
"Error loading database", "Could not find an usable and applicable database loader implementation");
|
||||
database=null;
|
||||
// if(TxEditorPlugin.getDefault().getTransactionDbFactory()!=null){
|
||||
// database = TxEditorPlugin.getDefault().getTransactionDbFactory().createDatabase();
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
/Debug/
|
||||
/my_db.log
|
||||
/my_db.tx
|
||||
/*.txlog
|
||||
/*.txdb
|
||||
|
|
|
@ -81,16 +81,16 @@ typedef scv_extensions_if::data_type data_type;
|
|||
|
||||
static void dbCb(const scv_tr_db& _scv_tr_db, scv_tr_db::callback_reason reason, void* data) {
|
||||
// This is called from the scv_tr_db ctor.
|
||||
static string my_sqlite_file_name("DEFAULT_scv_tr_sqlite");
|
||||
static string fName("DEFAULT_scv_tr_sqlite");
|
||||
switch (reason) {
|
||||
case scv_tr_db::CREATE:
|
||||
if ((_scv_tr_db.get_name() != NULL) && (strlen(_scv_tr_db.get_name()) != 0)) {
|
||||
my_sqlite_file_name = _scv_tr_db.get_name();
|
||||
}
|
||||
if ((_scv_tr_db.get_name() != NULL) && (strlen(_scv_tr_db.get_name()) != 0))
|
||||
fName = _scv_tr_db.get_name();
|
||||
try {
|
||||
my_sqlite_file_name+=".tx";
|
||||
remove(my_sqlite_file_name.c_str());
|
||||
db.open(my_sqlite_file_name.c_str());
|
||||
if(fName.size()<5 || fName.find(".txdb", fName.size() - 5) == string::npos)
|
||||
fName+=".txdb";
|
||||
remove(fName.c_str());
|
||||
db.open(fName.c_str());
|
||||
// scv_out << "TB Transaction Recording has started, file = " << my_sqlite_file_name << endl;
|
||||
db.exec("CREATE TABLE IF NOT EXISTS " STREAM_TABLE "(id INTEGER NOT NULL PRIMARY KEY, name TEXT, kind TEXT);");
|
||||
db.exec("CREATE TABLE IF NOT EXISTS " GENERATOR_TABLE "(id INTEGER NOT NULL PRIMARY KEY, stream INTEGER REFERENCES " STREAM_TABLE "(id), name TEXT, begin_attr INTEGER, end_attr INTEGER);");
|
||||
|
|
Loading…
Reference in New Issue