Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
kernel
Commits
26928efb
Commit
26928efb
authored
Jul 27, 2016
by
Vincent Aravantinos
Browse files
GREEN
refs 2490
parent
14c00bfe
Changes
6
Hide whitespace changes
Inline
Side-by-side
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/ToolingBaseUIActivator.java
View file @
26928efb
...
...
@@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
E598D5FAA197E58EF5B04C4E9E46EAED
* @ConQAT.Rating
GREEN
Hash:
CD6A4CF3945BC798002082D2F2112772
*/
public
class
ToolingBaseUIActivator
extends
AbstractUIPlugin
{
/** The plug-in ID. */
...
...
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/editingsupport/AnnotationEditingSupportBase.java
View file @
26928efb
...
...
@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
8102CB44C7931250F4224AA5019C5011
* @ConQAT.Rating
GREEN
Hash:
FAAC29DC1BA3288A13B3C686129B972C
*/
public
abstract
class
AnnotationEditingSupportBase
extends
EditingSupport
{
...
...
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/editingsupport/EditingSupportFactory.java
View file @
26928efb
...
...
@@ -51,7 +51,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
F6BC9688C61B6F0787EEE9EF94046CCF
* @ConQAT.Rating
GREEN
Hash:
D3E5F689E3633D6FEEB3C9C81C001D26
*/
public
class
EditingSupportFactory
{
...
...
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/editingsupport/MultiSelectionEditingSupport.java
View file @
26928efb
...
...
@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
9C6273D44DD9340894CD37DDFA216B7
3
* @ConQAT.Rating
GREEN
Hash:
F34CC0DE59A4E4ADC4040E26C276A65
3
*
*/
public
class
MultiSelectionEditingSupport
extends
AnnotationEditingSupportBase
{
...
...
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/generic/CreateAnnotationInstanceColumn.java
View file @
26928efb
...
...
@@ -48,6 +48,7 @@ import org.eclipse.swt.widgets.TableItem;
import
org.fortiss.tooling.base.annotation.AnnotationEntry
;
import
org.fortiss.tooling.base.annotation.IAnnotationValueService
;
import
org.fortiss.tooling.base.model.element.IAnnotatedSpecification
;
import
org.fortiss.tooling.base.model.element.IModelElement
;
import
org.fortiss.tooling.kernel.extension.data.ITopLevelElement
;
import
org.fortiss.tooling.kernel.service.IPersistencyService
;
...
...
@@ -65,7 +66,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author diewald, barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
5737954A300FB54DF6EEB82B0B95CF77
* @ConQAT.Rating
GREEN
Hash:
1868140DA1AD574D13EEAA2F8BCBA1BA
*/
public
class
CreateAnnotationInstanceColumn
extends
ViewerColumn
{
/** The column to be added to the table. */
...
...
@@ -225,29 +226,28 @@ public class CreateAnnotationInstanceColumn extends ViewerColumn {
// Register the new annotation instance with the model, by writing a null value
// for the input key provided by the user. A write transaction / a switch to the
// model context is required to modify the from the GUI context.
IModelElement
modelElt
=
columnSpecAnnEntry
.
getModelElement
();
ITopLevelElement
modelContext
=
IPersistencyService
.
getInstance
().
getTopLevelElementFor
(
columnSpecAnnEntry
.
getModelElement
());
IPersistencyService
.
getInstance
().
getTopLevelElementFor
(
modelElt
);
modelContext
.
runAsCommand
(()
->
{
try
{
String
value
=
populateInstance
();
AnnotationEntry
entry
=
IAnnotationValueService
.
getInstance
()
.
getAnnotationEntry
(
columnSpecAnnEntry
.
getModelElement
());
IAnnotationValueService
avs
=
IAnnotationValueService
.
getInstance
();
AnnotationEntry
entry
=
avs
.
getAnnotationEntry
(
modelElt
);
entry
.
setSpecificationValue
(
value
,
columnSpec
.
getClass
(),
instanceKey
);
// Inform others, e.g. the respective annotation view that a new
// instance of this annotation has been created.
columnSpecAnnEntry
.
getModelElement
().
eNotify
(
new
NotificationImpl
(
Notification
.
SET
,
null
,
null
)
{
@Override
public
Object
getNotifier
()
{
return
columnSpecAnnEntry
.
getModelElement
()
;
}
});
modelElt
.
eNotify
(
new
NotificationImpl
(
Notification
.
SET
,
null
,
null
)
{
@Override
public
Object
getNotifier
()
{
return
modelElt
;
}
});
}
catch
(
IllegalArgumentException
e
)
{
openError
(
new
Shell
(),
...
...
@@ -272,9 +272,8 @@ public class CreateAnnotationInstanceColumn extends ViewerColumn {
EStructuralFeature
dynamicInstanceFeature
=
columnSpec
.
eClass
().
getEStructuralFeatures
().
get
(
0
);
// ...annotations that can be dynamically instantiated are
// implemented using an appropriate EMap (which by convention
// has to be the // first (and only)) feature of the
// ...annotations that can be dynamically instantiated are implemented using an
// appropriate EMap (which by convention has to be the first (and only)) feature of the
// corresponding annotation class.
if
(
dynamicInstanceFeature
.
getEType
().
getInstanceTypeName
()
.
equals
(
"java.util.Map$Entry"
))
{
...
...
@@ -284,8 +283,7 @@ public class CreateAnnotationInstanceColumn extends ViewerColumn {
((
EClass
)
dynamicInstanceFeature
.
getEType
()).
getEStructuralFeature
(
"value"
);
if
(
Number
.
class
.
isAssignableFrom
(
valueFeature
.
getEType
().
getInstanceClass
()))
{
// Initialize numbers with 0
// (initialization fails with "")
// Initialize numbers with 0 (initialization fails with "")
value
=
"0"
;
}
}
...
...
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/generic/GenericAnnotationView.java
View file @
26928efb
...
...
@@ -79,7 +79,7 @@ import org.fortiss.tooling.base.ui.annotation.view.generic.filter.AnnotationFilt
* @author eder, diewald, barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
20B02B59811C764AEE63BC45A9279241
* @ConQAT.Rating
GREEN
Hash:
71F556F903C111B8280FD04616898B7E
*/
public
class
GenericAnnotationView
extends
AnnotationViewPartBase
{
/** Root composite of {@link GenericAnnotationView}. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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