Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
84622027
Commit
84622027
authored
6 years ago
by
Hernan Ponce de Leon
Browse files
Options
Downloads
Patches
Plain Diff
[RED] Code review + removed unused methods
parent
68776913
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/StatusUtils.java
+1
-43
1 addition, 43 deletions
...nk/src/org/fortiss/tooling/base/ui/utils/StatusUtils.java
with
1 addition
and
43 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/StatusUtils.java
+
1
−
43
View file @
84622027
...
...
@@ -15,15 +15,7 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.tooling.base.ui.utils
;
import
static
org
.
conqat
.
ide
.
commons
.
ui
.
ui
.
WorkbenchUtils
.
getActiveWorkbenchPage
;
import
org.eclipse.emf.common.util.EList
;
import
org.eclipse.jface.action.IStatusLineManager
;
import
org.eclipse.ui.IActionBars
;
import
org.eclipse.ui.IViewSite
;
import
org.eclipse.ui.IWorkbenchPage
;
import
org.eclipse.ui.IWorkbenchPart
;
import
org.eclipse.ui.IWorkbenchPartSite
;
import
org.fortiss.tooling.kernel.model.constraints.ConstraintInstance
;
import
org.fortiss.tooling.kernel.model.constraints.FailedConstraintInstanceStatus
;
import
org.fortiss.tooling.kernel.model.constraints.IConstraintInstanceContainer
;
...
...
@@ -35,41 +27,6 @@ import org.fortiss.tooling.kernel.model.constraints.IConstraintInstanceContainer
*/
public
class
StatusUtils
{
/**
* Returns a Status Line object of the current window.
*
* @return the status line manager
*/
public
static
IStatusLineManager
getStatusLine
()
{
IWorkbenchPage
page
=
getActiveWorkbenchPage
();
IWorkbenchPart
part
=
page
.
getActivePart
();
IWorkbenchPartSite
site
=
part
.
getSite
();
IViewSite
vSite
=
(
IViewSite
)
site
;
IActionBars
actionBars
=
vSite
.
getActionBars
();
if
(
actionBars
==
null
)
{
return
null
;
}
IStatusLineManager
statusLine
=
actionBars
.
getStatusLineManager
();
if
(
statusLine
==
null
)
{
return
null
;
}
return
statusLine
;
}
/**
* Writes messages into the status line of the current window.
*
* @param message
* the message
*/
public
static
void
setStatusMessage
(
String
message
)
{
if
(
getStatusLine
()
!=
null
)
{
getStatusLine
().
setMessage
(
message
);
}
}
/**
* This function is to calculate the status of all of the instances of a particular constraint.
*
...
...
@@ -86,6 +43,7 @@ public class StatusUtils {
IConstraintInstanceContainer
instanceContainer
,
EList
<
String
>
currentActiveConstraints
)
{
for
(
ConstraintInstance
ci
:
instanceContainer
.
getConstraintInstances
())
{
// TODO(HP) why using toString()? constraintToFind is already a string.
if
(
constraintToFind
.
toString
().
equalsIgnoreCase
(
ci
.
getConstraintName
()))
{
if
(
currentActiveConstraints
.
contains
(
constraintToFind
.
toString
()))
{
if
(
ci
.
getConstraintName
().
equalsIgnoreCase
(
constraintToFind
.
toString
()))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment