Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ERZ
RW_de.bsvrz.buv.plugin.dobj
Commits
c7e68b60
Commit
c7e68b60
authored
Jun 10, 2022
by
Christian Hoesel
Browse files
für das Logging in der GUI den Eclipse Logger verwenden
parent
d89ee870
Changes
16
Hide whitespace changes
Inline
Side-by-side
de.bsvrz.buv.plugin.dobj.feature/feature.xml
View file @
c7e68b60
...
...
@@ -19,13 +19,13 @@
</license>
<requires>
<import
plugin=
"org.eclipse.core.runtime"
version=
"3.9.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"org.eclipse.emf.ecore"
version=
"2.12.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.draw2d.svg"
version=
"2.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.emf"
version=
"2.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.emf.dav"
version=
"1.3.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.emf.davbitctrl"
version=
"1.6.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.emf.gef"
version=
"2.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"org.eclipse.emf.edit"
version=
"2.12.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"com.bitctrl.lib.eclipse.gef"
version=
"2.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"de.bsvrz.buv.rw.bitctrl"
version=
"3.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"de.bsvrz.sys.funclib.bitctrl.modell.datenkatalog"
version=
"3.0.0"
match=
"compatible"
/>
...
...
@@ -41,7 +41,7 @@
<import
plugin=
"org.eclipse.emf.common"
/>
<import
plugin=
"de.bsvrz.buv.plugin.dobj"
version=
"3.0.0"
match=
"greaterOrEqual"
/>
<import
feature=
"de.bsvrz.buv.rw.bitctrl.feature"
version=
"3.0.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"org.eclipse.
emf.edit
"
version=
"
2
.1
2
.0"
match=
"greaterOrEqual"
/>
<import
plugin=
"org.eclipse.
core.runtime
"
version=
"
3
.1
7
.0"
match=
"greaterOrEqual"
/>
</requires>
<plugin
...
...
de.bsvrz.buv.plugin.dobj/META-INF/MANIFEST.MF
View file @
c7e68b60
...
...
@@ -67,7 +67,7 @@ Export-Package: de.bsvrz.buv.plugin.darstellung.actions,
de.bsvrz.buv.plugin.doeditor.model.provider,
de.bsvrz.buv.plugin.doeditor.model.util,
de.bsvrz.buv.plugin.doeditor.util
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.
9
.0";visibility:=reexport,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.
17
.0";visibility:=reexport,
org.eclipse.emf.ecore;bundle-version="2.12.0";visibility:=reexport,
com.bitctrl.lib.eclipse.draw2d.svg;bundle-version="2.0.0",
com.bitctrl.lib.eclipse.emf;bundle-version="2.0.0";visibility:=reexport,
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/actions/LetzterEmpfangenerDavZeitStempelStatus.java
View file @
c7e68b60
...
...
@@ -72,8 +72,7 @@ public class LetzterEmpfangenerDavZeitStempelStatus extends DarstellungStatus im
@Override
public
void
run
()
{
setText
(
"Err: Log!"
);
DObjPlugin
.
getDefault
().
getLogger
()
.
error
(
"Zeitstempelproblem1 in "
+
obj
+
":\n"
+
errorStackTrace
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
"Zeitstempelproblem1 in "
+
obj
+
":\n"
+
errorStackTrace
);
}
});
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/actions/ZeigeAnsichtAction.java
View file @
c7e68b60
...
...
@@ -83,7 +83,7 @@ public class ZeigeAnsichtAction extends Action {
PlatformUI
.
getWorkbench
().
getActiveWorkbenchWindow
().
getActivePage
().
openEditor
(
input
,
AnsichtEditor
.
EDITOR_ID
);
}
catch
(
final
PartInitException
ex
)
{
DObjPlugin
.
getDefault
().
getLog
ger
()
DObjPlugin
.
getDefault
().
getLog
()
.
error
(
"Die Ansicht \""
+
ansicht
+
"\" konnte nicht geöffnet werden."
,
ex
);
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/editparts/DarstellungsSpalteEditPart.java
View file @
c7e68b60
...
...
@@ -36,7 +36,6 @@ import org.eclipse.gef.Request;
import
org.eclipse.gef.editpolicies.SnapFeedbackPolicy
;
import
com.bitctrl.lib.eclipse.emf.util.EmfUtil
;
import
com.bitctrl.lib.eclipse.log.PluginLogger
;
import
de.bsvrz.buv.plugin.darstellung.editpolicies.DarstellungsSpalteEditPolicy
;
import
de.bsvrz.buv.plugin.darstellung.editpolicies.DarstellungsSpalteXYLayoutEditPolicy
;
...
...
@@ -60,7 +59,6 @@ import de.bsvrz.buv.plugin.dobj.util.DobjUtil;
*/
public
class
DarstellungsSpalteEditPart
extends
BaseGraphicalEditPart
<
DarstellungsSpalte
,
DarstellungsSpalteFigure
>
{
private
final
PluginLogger
logger
=
DObjPlugin
.
getDefault
().
getLogger
();
private
final
boolean
debug
=
DObjPlugin
.
getDefault
().
isDebugging
();
private
boolean
online
;
...
...
@@ -111,8 +109,8 @@ public class DarstellungsSpalteEditPart extends BaseGraphicalEditPart<Darstellun
online
=
((
OnlineRequest
)
req
).
isOnline
();
if
(
debug
)
{
logger
.
info
(
"Darstellungsspalte "
+
EmfUtil
.
getText
(
getModel
())
+
" ist jetzt "
+
(
online
?
"online"
:
"offline"
)
+
"."
);
DObjPlugin
.
getDefault
().
getLog
()
.
info
(
"Darstellungsspalte "
+
EmfUtil
.
getText
(
getModel
())
+
" ist jetzt "
+
(
online
?
"online"
:
"offline"
)
+
"."
);
}
}
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/editparts/EbeneEditPart.java
View file @
c7e68b60
...
...
@@ -53,7 +53,6 @@ import org.eclipse.swt.graphics.Image;
import
com.bitctrl.lib.eclipse.draw2d.svg.SVGCache
;
import
com.bitctrl.lib.eclipse.emf.util.EmfUtil
;
import
com.bitctrl.lib.eclipse.log.PluginLogger
;
import
de.bsvrz.buv.plugin.darstellung.editpolicies.EbeneEditPolicy
;
import
de.bsvrz.buv.plugin.darstellung.editpolicies.EbeneXYLayoutEditPolicy
;
...
...
@@ -82,7 +81,6 @@ import de.bsvrz.sys.funclib.bitctrl.modell.metamodellglobal.attribute.AttByte_Ja
*/
public
class
EbeneEditPart
extends
BaseGraphicalEditPart
<
Ebene
,
EbeneFigure
>
{
private
final
PluginLogger
logger
=
DObjPlugin
.
getDefault
().
getLogger
();
private
final
boolean
debug
=
DObjPlugin
.
getDefault
().
isDebugging
();
private
boolean
online
;
...
...
@@ -146,7 +144,7 @@ public class EbeneEditPart extends BaseGraphicalEditPart<Ebene, EbeneFigure> {
online
=
((
OnlineRequest
)
req
).
isOnline
();
if
(
debug
)
{
logger
.
info
(
DObjPlugin
.
getDefault
().
getLog
()
.
info
(
"Ebene "
+
EmfUtil
.
getText
(
getModel
())
+
" ist jetzt "
+
(
online
?
"online"
:
"offline"
)
+
"."
);
}
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/editparts/tree/DarstellungTreeEditPartFactory.java
View file @
c7e68b60
...
...
@@ -133,7 +133,7 @@ public class DarstellungTreeEditPartFactory implements EditPartFactory {
// Kein Fallback, alles andere ist ein Fehler
String
msg
=
"Kann kein EditPart für das Modellobjekt erzeugen: "
;
msg
+=
model
!=
null
?
model
.
getClass
()
:
"null"
;
DObjPlugin
.
getDefault
().
getLog
ger
().
error
(
msg
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
msg
);
throw
new
IllegalArgumentException
(
msg
);
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/util/DarstellungIcons.java
View file @
c7e68b60
...
...
@@ -111,7 +111,7 @@ public enum DarstellungIcons {
imageDescriptor
=
DObjPlugin
.
getDefault
().
getImageDescriptor
(
imagePath
);
if
(
imageDescriptor
==
null
)
{
final
String
message
=
"Datei nicht gefunden: "
+
imagePath
;
DObjPlugin
.
getDefault
().
getLog
ger
().
error
(
message
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
message
);
}
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/views/DarstellungenView.java
View file @
c7e68b60
...
...
@@ -90,8 +90,7 @@ public class DarstellungenView extends AbstractEinstellungenView implements Prop
try
{
handlerService
.
executeCommand
(
"de.bsvrz.buv.plugin.dopositionierer.command.bearbeiteDarstellung"
,
null
);
}
catch
(
final
ExecutionException
ex
)
{
DObjPlugin
.
getDefault
().
getLogger
().
error
(
"Fehler beim Ausführen des Doppelklicks in DarstellungenView"
,
ex
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
"Fehler beim Ausführen des Doppelklicks in DarstellungenView"
,
ex
);
}
catch
(
final
NotDefinedException
|
NotEnabledException
|
NotHandledException
ex
)
{
/*
* wird ignoriert, weil Vorpositionier in dem Fall einfach nicht
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/wizards/AbstractExportWizard.java
View file @
c7e68b60
...
...
@@ -28,7 +28,7 @@ package de.bsvrz.buv.plugin.darstellung.wizards;
import
java.io.File
;
import
java.io.IOException
;
import
org.eclipse.core.runtime.
I
Status
;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.emf.common.util.URI
;
import
org.eclipse.emf.ecore.EClass
;
import
org.eclipse.emf.ecore.resource.Resource
;
...
...
@@ -43,8 +43,6 @@ import org.eclipse.ui.PlatformUI;
import
com.bitctrl.lib.eclipse.emf.eclipse.model.Named
;
import
com.bitctrl.lib.eclipse.emf.util.EmfUtil
;
import
de.bsvrz.buv.plugin.dobj.internal.DObjPlugin
;
/**
* Basisklasse für einen Wizard, die ein in den Rahmenwerkseinstellungen
* gespeichertes {@link Named}-Objekt exportiert.
...
...
@@ -114,10 +112,8 @@ public abstract class AbstractExportWizard extends AbstractWorkbenchWizard imple
resource
.
save
(
null
);
}
catch
(
final
IOException
ex
)
{
final
String
message
=
"Die Datei konnte nicht geschrieben werden: "
+
EmfUtil
.
getText
(
object
);
final
IStatus
status
=
DObjPlugin
.
getDefault
().
getLogger
().
error
(
message
,
ex
);
ErrorDialog
.
openError
(
PlatformUI
.
getWorkbench
().
getActiveWorkbenchWindow
().
getShell
(),
"Fehler beim Export"
,
message
,
s
tatus
);
"Fehler beim Export"
,
message
,
S
tatus
.
error
(
message
,
ex
)
);
return
false
;
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/darstellung/wizards/AbstractImportWizard.java
View file @
c7e68b60
...
...
@@ -191,7 +191,6 @@ public abstract class AbstractImportWizard extends AbstractWorkbenchWizard {
+
"\n\nMöchten Sie die Darstellung trotz der Fehler importieren?\n\nDabei "
+
"würden die fehlenden Darstellungsobjekte aus der Darstellung entfernt. "
+
"Andernfalls installieren Sie bitte zunächst die notwendigen Darstellungsobjekte!"
;
final
IStatus
status
=
DObjPlugin
.
getDefault
().
getLogger
().
error
(
message
,
ex
);
final
List
<
IStatus
>
errors
=
readErrors
(
resource
);
...
...
@@ -201,7 +200,7 @@ public abstract class AbstractImportWizard extends AbstractWorkbenchWizard {
final
QuestionErrorDialog
dialog
=
new
QuestionErrorDialog
(
getShell
(),
"Fehler beim Import"
,
message
,
multiStatus
,
IStatus
.
OK
|
IStatus
.
INFO
|
IStatus
.
WARNING
|
IStatus
.
ERROR
);
if
(
IDialogConstants
.
CANCEL_ID
==
dialog
.
open
())
{
return
s
tatus
;
return
S
tatus
.
error
(
message
,
ex
)
;
}
}
...
...
@@ -209,7 +208,7 @@ public abstract class AbstractImportWizard extends AbstractWorkbenchWizard {
final
EList
<
EObject
>
contents
=
resource
.
getContents
();
if
(
contents
.
size
()
!=
1
)
{
final
String
message
=
"Die Datei ist fehlerhaft und kann nicht gelesen werden: "
+
file
;
final
IStatus
status
=
DObjPlugin
.
getDefault
().
getLogger
()
.
error
(
message
);
final
IStatus
status
=
Status
.
error
(
message
);
ErrorDialog
.
openError
(
PlatformUI
.
getWorkbench
().
getActiveWorkbenchWindow
().
getShell
(),
"Fehler beim Import"
,
message
,
status
);
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/dobj/internal/DObjPlugin.java
View file @
c7e68b60
...
...
@@ -26,17 +26,17 @@
package
de.bsvrz.buv.plugin.dobj.internal
;
import
org.eclipse.jface.resource.ImageDescriptor
;
import
org.eclipse.ui.plugin.AbstractUIPlugin
;
import
org.osgi.framework.BundleContext
;
import
com.bitctrl.lib.eclipse.AbstractBitCtrlPlugin
;
/**
* Das Plug-in <em>Darstellungsobjekte</em>.
*
* @author BitCtrl Systems GmbH, Uwe Peuker
*
*/
public
class
DObjPlugin
extends
Abstract
BitCtrl
Plugin
{
public
class
DObjPlugin
extends
Abstract
UI
Plugin
{
/** Die ID des Plugins. */
public
static
final
String
PLUGIN_ID
=
"de.bsvrz.buv.plugin.dobj"
;
...
...
@@ -64,4 +64,17 @@ public class DObjPlugin extends AbstractBitCtrlPlugin {
DObjPlugin
.
plugin
=
null
;
super
.
stop
(
context
);
}
/**
* Sucht in diesem Plug-in nach einem Bild und gibt dessen Descriptor
* zurück.
*
* @param imageFilePath
* der relative Pfad im Plug-in zum gesuchten Bild.
* @return der Descriptor zum Bild oder <code>null</code>, wenn das Bild
* nicht gefunden werden konnte.
*/
public
ImageDescriptor
getImageDescriptor
(
final
String
imageFilePath
)
{
return
imageDescriptorFromPlugin
(
getBundle
().
getSymbolicName
(),
imageFilePath
);
}
}
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/dobj/util/DobjCursors.java
View file @
c7e68b60
...
...
@@ -53,7 +53,7 @@ public enum DobjCursors {
}
else
{
cursor
=
null
;
final
String
message
=
"Datei nicht gefunden: "
+
imagePath
;
DObjPlugin
.
getDefault
().
getLog
ger
().
error
(
message
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
message
);
}
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/dobj/util/DobjIcons.java
View file @
c7e68b60
...
...
@@ -105,7 +105,7 @@ public enum DobjIcons {
imageDescriptor
=
DObjPlugin
.
getDefault
().
getImageDescriptor
(
imagePath
);
if
(
imageDescriptor
==
null
)
{
final
String
message
=
"Datei nicht gefunden: "
+
imagePath
;
DObjPlugin
.
getDefault
().
getLog
ger
().
error
(
message
);
DObjPlugin
.
getDefault
().
getLog
().
error
(
message
);
}
}
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/doeditor/figures/PolygonFormFigure.java
View file @
c7e68b60
...
...
@@ -150,8 +150,7 @@ public class PolygonFormFigure extends Polygon implements VisibleFormFigure {
}
}
else
if
(
decorator
instanceof
DrehwinkelParameterDefinition
)
{
// setAngle((Float) wert);
DObjPlugin
.
getDefault
().
getLogger
()
.
warning
(
"Die Änderung des Drehwinkels wird für Polygone nicht unterstützt!"
);
DObjPlugin
.
getDefault
().
getLog
().
warn
(
"Die Änderung des Drehwinkels wird für Polygone nicht unterstützt!"
);
}
else
if
(
decorator
instanceof
LineAttributeParameterDefinition
)
{
final
ELineAttributes
att
=
((
LineAttributeParameterDefinition
)
decorator
).
getLineAttributes
();
if
(
att
!=
null
)
{
...
...
de.bsvrz.buv.plugin.dobj/src/de/bsvrz/buv/plugin/doeditor/figures/PolylineFormFigure.java
View file @
c7e68b60
...
...
@@ -128,9 +128,8 @@ public class PolylineFormFigure extends Polyline implements VisibleFormFigure {
setForegroundColor
(
resourceManager
.
createColor
(
rgb
));
}
}
else
if
(
decorator
instanceof
DrehwinkelParameterDefinition
)
{
// TODO setAngle((Float) wert);
DObjPlugin
.
getDefault
().
getLogger
()
.
warning
(
"Die Änderung des Drehwinkels wird für Polylinien nicht unterstützt!"
);
DObjPlugin
.
getDefault
().
getLog
()
.
warn
(
"Die Änderung des Drehwinkels wird für Polylinien nicht unterstützt!"
);
}
else
if
(
decorator
instanceof
LineAttributeParameterDefinition
)
{
final
ELineAttributes
att
=
((
LineAttributeParameterDefinition
)
decorator
).
getLineAttributes
();
if
(
att
!=
null
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment