Skip to content

Commit fd1a10e

Browse files
author
Hannes Lenke
committed
added new checkin view
1 parent 4562af5 commit fd1a10e

32 files changed

+1348
-559
lines changed

.settings/org.eclipse.jdt.core.prefs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#Sat Oct 18 18:48:17 GMT+01:00 2008
1+
#Sun Feb 12 12:00:50 CET 2012
22
eclipse.preferences.version=1
33
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
55
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6-
org.eclipse.jdt.core.compiler.compliance=1.5
6+
org.eclipse.jdt.core.compiler.compliance=1.6
77
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
88
org.eclipse.jdt.core.compiler.debug.localVariable=generate
99
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
1010
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
1111
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12-
org.eclipse.jdt.core.compiler.source=1.5
12+
org.eclipse.jdt.core.compiler.source=1.6

META-INF/MANIFEST.MF

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: EclipseMatrix Plug-in
4-
Bundle-SymbolicName: EclipseMatrix; singleton:=true
4+
Bundle-SymbolicName: EclipseMatrix;singleton:=true
55
Bundle-Version: 1.0.0
66
Bundle-Activator: eclipsematrix.EclipseMatrix
77
Require-Bundle: org.eclipse.ui,
@@ -17,5 +17,6 @@ Bundle-ActivationPolicy: lazy
1717
Bundle-RequiredExecutionEnvironment: J2SE-1.5
1818
Bundle-ClassPath: .,
1919
libs/examples.jar,
20-
libs/jnotify-0.93.jar
21-
Bundle-NativeCode: jnotify.dll;osname=Win32;processor=x86, libjnotify.so;osname=linux;processor=x86
20+
libs/jnotify-0.93.jar,
21+
libs/images.jar
22+
Bundle-NativeCode: jnotify.dll;osname=Win32;processor=x86, libjnotify.dylib;osname=linux;processor=x86_64

build.properties

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,15 @@ bin.includes = plugin.xml,\
99
jnotify_64bit.dll,\
1010
libjnotify.dylib,\
1111
libjnotify.so,\
12-
libs/
12+
libs/,\
13+
src/
14+
src.includes = src/,\
15+
plugin.xml,\
16+
libs/,\
17+
libjnotify.so,\
18+
libjnotify.dylib,\
19+
jnotify_64bit.dll,\
20+
jnotify.dll,\
21+
icons/,\
22+
contexts.xml,\
23+
META-INF/

icons/error.gif

339 Bytes
Loading

libs/images.jar

27.5 KB
Binary file not shown.

plugin.xml

-23
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<extension
66
point="org.eclipse.ui.decorators">
77
<decorator
8-
lightweight="true"
98
location="BOTTOM_RIGHT"
109
adaptable="true"
1110
label="Resource Decorator"
@@ -43,16 +42,6 @@
4342
class="eclipsematrix.preferences.PreferenceInitializer">
4443
</initializer>
4544
</extension>
46-
<extension
47-
point="org.eclipse.ui.propertyPages">
48-
<page
49-
objectClass="org.eclipse.core.resources.IFile"
50-
name="Sample Page"
51-
nameFilter="*.*"
52-
class="eclipsematrix.properties.SamplePropertyPage"
53-
id="eclipsematrix.properties.samplePropertyPage">
54-
</page>
55-
</extension>
5645
<extension
5746
point="org.eclipse.ui.views">
5847
<category
@@ -82,18 +71,6 @@
8271
restorable="true">
8372
</view>
8473
</extension>
85-
<extension
86-
point="org.eclipse.ui.perspectiveExtensions">
87-
<perspectiveExtension
88-
targetID="org.eclipse.jdt.ui.JavaPerspective">
89-
<view
90-
ratio="0.5"
91-
relative="org.eclipse.ui.views.TaskList"
92-
relationship="right"
93-
id="eclipsematrix.views.SampleView">
94-
</view>
95-
</perspectiveExtension>
96-
</extension>
9774
<extension
9875
point="org.eclipse.help.contexts">
9976
<contexts

src/at/bestsolution/dataforms/util/viewers/GenericObservableMapCellLabelProvider.java

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public String getText(Object element) {
9090
}
9191
return MessageFormat.format(templateText, elements);
9292
}
93-
9493
return null;
9594
}
9695
}

src/eclipsematrix/EclipseMatrix.java

+20-11
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
import matrix.db.Context;
66
import matrix.util.MatrixException;
77

8+
import org.eclipse.core.internal.content.Activator;
89
import org.eclipse.jface.preference.IPreferenceStore;
910
import org.eclipse.jface.resource.ImageDescriptor;
11+
import org.eclipse.swt.graphics.Image;
1012
import org.eclipse.ui.PlatformUI;
1113
import org.eclipse.ui.plugin.AbstractUIPlugin;
1214
import org.osgi.framework.BundleContext;
@@ -28,26 +30,26 @@
2830
*
2931
* 5. bei process start button disablen danach wieder
3032
* enablen
31-
* Number Generator Object Creation Setups berücksichtigen
33+
* Number Generator Object Creation Setups ber�cksichtigen
3234
* Menu vor Menu Actions importieren geht nicht --> Idee ?
3335
* - matrixexception rausnehmen - versuchen
34-
* das logging zu verbessern --> näher an die mql ausgaben ran
35-
* (workaround bei import über textfeld dateinamen mit anzeigen) DONE -
36+
* das logging zu verbessern --> n�her an die mql ausgaben ran
37+
* (workaround bei import �ber textfeld dateinamen mit anzeigen) DONE -
3638
* export - unsufficent Memory - Repository wechseln altes Repo angeben
37-
* neues Repo angeben JPOs und Commands löschen --> neue einspielen! -
39+
* neues Repo angeben JPOs und Commands l�schen --> neue einspielen! -
3840
* Plugin: Mass Checkin mit Checkbox Popup Dialog
3941
*
40-
* DONE : - Log immer new line DONE - Löschen des inputfields nach
42+
* DONE : - Log immer new line DONE - L�schen des inputfields nach
4143
* checkin DONE - hoch runter --> alte befehle zeigen oder die letzten 5
4244
* in einem Context Menu DONE - cmd ui und jpo files die nur vom
43-
* explorer getoucht wurden --> Datumsvergleich von geändert nach dem
44-
* "Monitor" DONE - Fortschrittsbalken für App DONE - Rename reagieren
45-
* --> old aus liste löschen neues hinzufügen 20.02.09 2. EclipseMatrix
45+
* explorer getoucht wurden --> Datumsvergleich von ge�ndert nach dem
46+
* "Monitor" DONE - Fortschrittsbalken f�r App DONE - Rename reagieren
47+
* --> old aus liste l�schen neues hinzuf�gen 20.02.09 2. EclipseMatrix
4648
* FileList muss sich aus den einzelnen MXLists ergeben und nicht extra
4749
* gepflegt werden
4850
* 4. implement cancel for import process
4951
* 5. Filtern der Tabellen (changed, all..)
50-
* support für Attribute verbessern STRING REAL INTEGER etc
52+
* support f�r Attribute verbessern STRING REAL INTEGER etc
5153
*/
5254
public class EclipseMatrix extends AbstractUIPlugin {
5355

@@ -66,8 +68,8 @@ public class EclipseMatrix extends AbstractUIPlugin {
6668
/**
6769
* The constructor.
6870
*/
69-
public EclipseMatrix() {
70-
}
71+
// public EclipseMatrix() {
72+
// }
7173

7274
/*
7375
* (non-Javadoc)
@@ -208,4 +210,11 @@ public CheckInView getCheckInView() {
208210
public void updateLogFile(final MxFileList list) {
209211
FileUtil.generateTextFile(list);
210212
}
213+
214+
public static Image getImage(String imagePath) {
215+
ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(EclipseMatrix.PLUGIN_ID, imagePath);
216+
Image image = imageDescriptor.createImage();
217+
return image;
218+
}
219+
211220
}

src/eclipsematrix/checkin/toolbar/DMCheckin.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
import org.eclipse.jface.dialogs.MessageDialog;
77
import org.eclipse.ui.handlers.HandlerUtil;
88

9+
import eclipsematrix.entities.RecordProvider;
10+
import eclipsematrix.jobs.NewMQLInstallJob;
11+
912
public class DMCheckin extends AbstractHandler {
1013
public Object execute(ExecutionEvent event) throws ExecutionException {
11-
// MQLInstallJob job = new MQLInstallJob("JPO Install", jpoList);
12-
// job.setUser(true);
13-
// job.schedule();
14-
MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
15-
event).getShell(), "Info", "Info for you");
14+
NewMQLInstallJob job = new NewMQLInstallJob("JPO Install",
15+
RecordProvider.INSTANCE.getDMRecords());
16+
job.setUser(true);
17+
job.schedule();
1618
return null;
1719
}
1820

src/eclipsematrix/checkin/toolbar/JpoCheckin.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
import org.eclipse.jface.dialogs.MessageDialog;
77
import org.eclipse.ui.handlers.HandlerUtil;
88

9-
import eclipsematrix.jobs.MQLInstallJob;
9+
import eclipsematrix.entities.RecordProvider;
10+
import eclipsematrix.jobs.NewMQLInstallJob;
1011

1112
public class JpoCheckin extends AbstractHandler {
1213
public Object execute(ExecutionEvent event) throws ExecutionException {
13-
// MQLInstallJob job = new MQLInstallJob("JPO Install", jpoList);
14-
// job.setUser(true);
15-
// job.schedule();
16-
MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
17-
event).getShell(), "Info", "Info for you");
18-
return null;
14+
NewMQLInstallJob job = new NewMQLInstallJob("JPO Install",
15+
RecordProvider.INSTANCE.getJPORecords());
16+
job.setUser(true);
17+
job.schedule();
18+
return null;
1919
}
2020

2121
}
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,53 @@
11
package eclipsematrix.checkin.toolbar;
22

3+
import java.util.Random;
4+
35
import net.contentobjects.jnotify.JNotify;
6+
import net.contentobjects.jnotify.JNotifyException;
47

58
import org.eclipse.core.commands.AbstractHandler;
69
import org.eclipse.core.commands.ExecutionEvent;
710
import org.eclipse.core.commands.ExecutionException;
11+
import org.eclipse.core.commands.HandlerEvent;
812
import org.eclipse.jface.preference.IPreferenceStore;
913

1014
import eclipsematrix.EclipseMatrix;
15+
import eclipsematrix.notifier.NotificationType;
16+
import eclipsematrix.notifier.NotifierDialog;
1117
import eclipsematrix.preferences.PreferenceConstants;
1218
import eclipsematrix.utils.FileListener;
1319

1420
public class MonitorFiles extends AbstractHandler {
15-
//private FileMonitor monitor = FileMonitor.getInstance();
16-
//private JPOFileListener jpoFileListener = new JPOFileListener();
17-
21+
// private FileMonitor monitor = FileMonitor.getInstance();
22+
// private JPOFileListener jpoFileListener = new JPOFileListener();
23+
1824
boolean enabled = true;
19-
25+
2026
public Object execute(ExecutionEvent event) throws ExecutionException {
21-
IPreferenceStore store = EclipseMatrix.getDefault().getPreferenceStore();
22-
//FIXME check prefs
23-
String jpoDir = store.getString(PreferenceConstants.P_JPOPATH);
24-
String uiDir = store.getString(PreferenceConstants.P_UIPATH);
25-
String dmDir = store.getString(PreferenceConstants.P_DMPATH);
26-
27+
IPreferenceStore store = EclipseMatrix.getDefault()
28+
.getPreferenceStore();
29+
// FIXME check prefs
30+
String jpoDir = store.getString(PreferenceConstants.P_JPOPATH);
31+
String uiDir = store.getString(PreferenceConstants.P_UIPATH);
32+
String dmDir = store.getString(PreferenceConstants.P_DMPATH);
33+
2734
try {
2835
setFilemonitor(jpoDir);
2936
setFilemonitor(uiDir);
3037
setFilemonitor(dmDir);
3138
} catch (Exception e) {
32-
// TODO Auto-generated catch block
3339
e.printStackTrace();
3440
}
35-
// MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
36-
// event).getShell(), "Info", "Files Monitored");
37-
38-
//FIXME force refresh of command
41+
42+
// FIXME use notifier
43+
// MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
44+
// event).getShell(), "Info", "Files Monitored");
45+
3946
enabled = false;
47+
fireHandlerChanged(new HandlerEvent(this, true, false));
4048
return null;
4149
}
42-
50+
4351
@Override
4452
public boolean isEnabled() {
4553
boolean isEnabled = super.isEnabled();
@@ -49,26 +57,25 @@ public boolean isEnabled() {
4957
return enabled;
5058
}
5159

60+
public int setFilemonitor(String path) {
61+
int watchID = 0;
62+
// watch mask, specify events you care about,
63+
// or JNotify.FILE_ANY for all events.
64+
int mask = JNotify.FILE_CREATED | JNotify.FILE_DELETED
65+
| JNotify.FILE_MODIFIED | JNotify.FILE_RENAMED;
5266

67+
// watch subtree?
68+
boolean watchSubtree = true;
5369

54-
55-
public void setFilemonitor(String path) throws Exception {
56-
// watch mask, specify events you care about,
57-
// or JNotify.FILE_ANY for all events.
58-
int mask = JNotify.FILE_CREATED |
59-
JNotify.FILE_DELETED |
60-
JNotify.FILE_MODIFIED |
61-
JNotify.FILE_RENAMED;
62-
63-
// watch subtree?
64-
boolean watchSubtree = true;
65-
66-
// add actual watch
67-
int watchID = JNotify.addWatch(path, mask, watchSubtree, new FileListener());
68-
// // to remove watch the watch
69-
// boolean res = JNotify.removeWatch(watchID);
70-
// if (!res) {
71-
// // invalid watch ID specified.
72-
// }
73-
}
70+
// add actual watch
71+
try {
72+
watchID = JNotify.addWatch(path, mask, watchSubtree,
73+
new FileListener());
74+
} catch (JNotifyException e) {
75+
// FIXME Print error
76+
// TODO Auto-generated catch block
77+
e.printStackTrace();
78+
}
79+
return watchID;
80+
}
7481
}

src/eclipsematrix/checkin/toolbar/UICheckin.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
import org.eclipse.core.commands.AbstractHandler;
44
import org.eclipse.core.commands.ExecutionEvent;
55
import org.eclipse.core.commands.ExecutionException;
6-
import org.eclipse.jface.dialogs.MessageDialog;
7-
import org.eclipse.ui.handlers.HandlerUtil;
6+
7+
import eclipsematrix.entities.RecordProvider;
8+
import eclipsematrix.jobs.NewMQLInstallJob;
89

910
public class UICheckin extends AbstractHandler {
1011
public Object execute(ExecutionEvent event) throws ExecutionException {
11-
// MQLInstallJob job = new MQLInstallJob("JPO Install", jpoList);
12-
// job.setUser(true);
13-
// job.schedule();
14-
MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
15-
event).getShell(), "Info", "Info for you");
16-
return null;
12+
NewMQLInstallJob job = new NewMQLInstallJob("JPO Install",
13+
RecordProvider.INSTANCE.getUIRecords());
14+
job.setUser(true);
15+
job.schedule();
16+
return null;
1717
}
1818

1919
}

0 commit comments

Comments
 (0)