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
AF3
Commits
1d3ae4cf
Commit
1d3ae4cf
authored
Jan 30, 2012
by
Florian Hölzl
Browse files
YELLOW
refs 311
parent
b4ae6e03
Changes
6
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.component.ui/trunk/META-INF/MANIFEST.MF
View file @
1d3ae4cf
...
...
@@ -25,6 +25,5 @@ Export-Package: org.fortiss.af3.component.ui,
org.fortiss.af3.component.ui.simulator,
org.fortiss.af3.component.ui.simulator.component,
org.fortiss.af3.component.ui.simulator.menu,
org.fortiss.af3.component.ui.simulator.views,
org.fortiss.af3.component.ui.utils
org.fortiss.af3.component.ui.simulator.views
Import-Package: org.eclipse.ui.texteditor
org.fortiss.af3.component.ui/trunk/src/org/fortiss/af3/component/ui/editor/CodeSpecificationEditorBackend.java
View file @
1d3ae4cf
...
...
@@ -19,7 +19,7 @@ package org.fortiss.af3.component.ui.editor;
import
static
org
.
eclipse
.
swt
.
SWT
.
LEFT
;
import
static
org
.
eclipse
.
swt
.
SWT
.
TOP
;
import
static
org
.
fortiss
.
af3
.
component
.
ui
.
utils
.
Component
FieldAssist
Utils
.
getPorts
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
Component
Architecture
Utils
.
getPort
Name
s
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getAllConstructors
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getFunctions
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getPrimitiveValues
;
...
...
@@ -50,7 +50,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.EditorBase;
* @author doebber
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating
GREEN
Hash:
0E930E7A79B45BE313CAA61210498E85
* @ConQAT.Rating
YELLOW
Hash:
A9264F2FAEA25FFFF61D545DA6FE616E
*/
public
class
CodeSpecificationEditorBackend
extends
...
...
@@ -72,7 +72,8 @@ public class CodeSpecificationEditorBackend extends
@Override
/** {@inheritDoc} */
public
String
[]
getProposals
(
String
currentWord
)
{
ArrayList
<
String
>
prop
=
getPorts
(
editedObject
.
getComponent
());
ArrayList
<
String
>
prop
=
getPortNames
(
editedObject
.
getComponent
());
prop
.
addAll
(
getFunctions
(
editedObject
));
prop
.
addAll
(
getAllConstructors
(
editedObject
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
...
...
org.fortiss.af3.component.ui/trunk/src/org/fortiss/af3/component/ui/utils/ComponentFieldAssistUtils.java
deleted
100644 → 0
View file @
b4ae6e03
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2012 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.component.ui.utils
;
import
java.util.ArrayList
;
import
org.fortiss.af3.component.model.Component
;
import
org.fortiss.tooling.base.model.element.IConnector
;
import
org.fortiss.tooling.kernel.model.INamedElement
;
/**
* Utils class for assembling component related proposals for FieldAssist.
*
* @author doebber
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash: B8276D1CCF8DABC54C532999BCE5B59B
*/
public
class
ComponentFieldAssistUtils
{
// TODO(review): move method to ComponentArchitectureUtils and delete
// ComponentFieldAssistUtils
/**
* Returns all ports of given component.
*
* @param component
* the component to be searched for port names
* @return the list of port names
*/
public
static
ArrayList
<
String
>
getPorts
(
Component
component
)
{
ArrayList
<
String
>
result
=
new
ArrayList
<
String
>();
for
(
IConnector
conn
:
component
.
getConnectorsList
())
{
if
(
conn
instanceof
INamedElement
)
{
result
.
add
(((
INamedElement
)
conn
).
getName
());
}
}
return
result
;
}
}
org.fortiss.af3.component/trunk/src/org/fortiss/af3/component/utils/ComponentArchitectureUtils.java
View file @
1d3ae4cf
...
...
@@ -34,6 +34,7 @@ import org.fortiss.af3.component.model.impl.CausalityComponentSpecificationImpl;
import
org.fortiss.af3.component.model.impl.ComponentArchitectureImpl
;
import
org.fortiss.af3.project.model.FileProject
;
import
org.fortiss.af3.project.model.typesystem.IVariableDefinition
;
import
org.fortiss.tooling.base.model.element.IConnector
;
import
org.fortiss.tooling.base.model.element.IModelElementSpecification
;
import
org.fortiss.tooling.kernel.model.INamedElement
;
import
org.fortiss.tooling.kernel.model.IProjectRootElement
;
...
...
@@ -45,7 +46,7 @@ import org.fortiss.tooling.kernel.utils.KernelModelElementUtils;
* @author ratiu
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating
GREEN
Hash:
646669260DDEEF5C69AE086E9DE7C2F0
* @ConQAT.Rating
YELLOW
Hash:
C0C643C288E703F03B701330601CF5B6
*/
public
class
ComponentArchitectureUtils
{
...
...
@@ -298,4 +299,21 @@ public class ComponentArchitectureUtils {
}
}
}
/**
* Returns all port names of given component.
*
* @param component
* the component to be searched for port names
* @return the list of port names
*/
public
static
ArrayList
<
String
>
getPortNames
(
Component
component
)
{
ArrayList
<
String
>
result
=
new
ArrayList
<
String
>();
for
(
IConnector
conn
:
component
.
getConnectorsList
())
{
if
(
conn
instanceof
INamedElement
)
{
result
.
add
(((
INamedElement
)
conn
).
getName
());
}
}
return
result
;
}
}
org.fortiss.af3.state.ui/trunk/src/org/fortiss/af3/state/ui/properties/StateSpecificationPropertySection.java
View file @
1d3ae4cf
...
...
@@ -17,8 +17,8 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z ratiu $
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.state.ui.properties
;
import
static
org
.
fortiss
.
af3
.
component
.
ui
.
utils
.
ComponentFieldAssistUtils
.
getPorts
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentArchitectureUtils
.
getEnclosingComponent
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentArchitectureUtils
.
getPortNames
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getAllConstructors
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getFunctions
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getPrimitiveValues
;
...
...
@@ -55,7 +55,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author ratiu
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash:
8C91EBD1657A33350DF04B2B16B790DC
* @ConQAT.Rating YELLOW Hash:
68842731C1ACF4ABA18E10190E372FB6
*/
public
class
StateSpecificationPropertySection
extends
PropertySectionBase
{
...
...
@@ -93,7 +93,7 @@ public class StateSpecificationPropertySection extends PropertySectionBase {
@Override
/** {@inheritDoc} */
public
String
[]
getProposals
(
String
currentWord
)
{
ArrayList
<
String
>
prop
=
getPorts
(
getEnclosingComponent
(
state
));
ArrayList
<
String
>
prop
=
getPort
Name
s
(
getEnclosingComponent
(
state
));
prop
.
addAll
(
getFunctions
(
state
));
prop
.
addAll
(
getAllConstructors
(
state
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
...
...
org.fortiss.af3.state.ui/trunk/src/org/fortiss/af3/state/ui/properties/TransitionSegmentSpecificationPropertySection.java
View file @
1d3ae4cf
...
...
@@ -17,8 +17,8 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z ratiu $
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.state.ui.properties
;
import
static
org
.
fortiss
.
af3
.
component
.
ui
.
utils
.
ComponentFieldAssistUtils
.
getPorts
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentArchitectureUtils
.
getEnclosingComponent
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentArchitectureUtils
.
getPortNames
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getAllConstructors
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getFunctions
;
import
static
org
.
fortiss
.
af3
.
expression
.
ui
.
utils
.
ExpressionFieldAssistUtils
.
getPrimitiveValues
;
...
...
@@ -57,7 +57,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author ratiu
* @author $Author: ratiu $
* @version $Rev: 5320 $
* @ConQAT.Rating YELLOW Hash:
254F47BFD7867C2CC6B3B258295EE3A9
* @ConQAT.Rating YELLOW Hash:
EDF6A5E471F01189F2AAD99AF717D69F
*/
public
class
TransitionSegmentSpecificationPropertySection
extends
PropertySectionWithCopyPasteBase
<
TransitionSegmentSpecification
>
{
...
...
@@ -90,7 +90,7 @@ public class TransitionSegmentSpecificationPropertySection extends
@Override
/** {@inheritDoc} */
public
String
[]
getProposals
(
String
currentWord
)
{
ArrayList
<
String
>
prop
=
getPorts
(
getEnclosingComponent
(
specification
));
ArrayList
<
String
>
prop
=
getPort
Name
s
(
getEnclosingComponent
(
specification
));
prop
.
addAll
(
getFunctions
(
specification
));
prop
.
addAll
(
getAllConstructors
(
specification
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
...
...
@@ -101,7 +101,7 @@ public class TransitionSegmentSpecificationPropertySection extends
@Override
/** {@inheritDoc} */
public
String
[]
getProposals
(
String
currentWord
)
{
ArrayList
<
String
>
prop
=
getPorts
(
getEnclosingComponent
(
specification
));
ArrayList
<
String
>
prop
=
getPort
Name
s
(
getEnclosingComponent
(
specification
));
prop
.
addAll
(
getFunctions
(
specification
));
prop
.
addAll
(
getAllConstructors
(
specification
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
...
...
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