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
c86b6632
Commit
c86b6632
authored
Jul 01, 2013
by
Sabine Teufl
Browse files
bug in sorting of requirements removed
refs 1400
parent
978ee355
Changes
2
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.mira.ui/trunk/src/org/fortiss/af3/mira/ui/editor/overview/OverviewComparator.java
View file @
c86b6632
...
...
@@ -17,7 +17,7 @@ $Id$
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.mira.ui.editor.overview
;
import
static
org
.
fortiss
.
af3
.
mira
.
utils
.
MiraUtils
.
getAdditional
ly
InformationFor
;
import
static
org
.
fortiss
.
af3
.
mira
.
utils
.
MiraUtils
.
getAdditionalInformationFor
;
import
static
org
.
fortiss
.
af3
.
mira
.
utils
.
MiraUtils
.
getContextElementName
;
import
static
org
.
fortiss
.
af3
.
mira
.
utils
.
MiraUtils
.
getRequirementName
;
import
static
org
.
fortiss
.
af3
.
mira
.
utils
.
MiraUtils
.
getTypeRankingFor
;
...
...
@@ -118,9 +118,9 @@ public class OverviewComparator extends ViewerComparator {
case
2
:
rc
=
getAdditional
ly
InformationFor
((
INamedCommentedElement
)
e1
)
getAdditionalInformationFor
((
INamedCommentedElement
)
e1
)
.
compareToIgnoreCase
(
getAdditional
ly
InformationFor
((
INamedCommentedElement
)
e2
));
getAdditionalInformationFor
((
INamedCommentedElement
)
e2
));
break
;
case
3
:
...
...
org.fortiss.af3.mira/trunk/src/org/fortiss/af3/mira/utils/MiraUtils.java
View file @
c86b6632
...
...
@@ -261,21 +261,36 @@ public class MiraUtils {
* the {@link EObject}
* @return the additional information
*/
public
static
String
getAdditional
ly
InformationFor
(
EObject
object
)
{
public
static
String
getAdditionalInformationFor
(
EObject
object
)
{
if
(
object
instanceof
Analysis
||
object
instanceof
RequirementsContainer
||
object
instanceof
RequirementsPackage
||
object
instanceof
Glossary
||
object
instanceof
RequirementSource
)
{
return
"-"
;
}
if
(
object
instanceof
Requirement
)
{
return
((
Requirement
)
object
).
getDescription
();
return
stringNotNull
(
((
Requirement
)
object
).
getDescription
()
,
""
)
;
}
if
(
object
instanceof
ContextElement
)
{
return
((
ContextElement
)
object
).
getDefinition
();
return
stringNotNull
(
((
ContextElement
)
object
).
getDefinition
()
,
""
)
;
}
return
"Not an object for requirements analysis"
;
}
/**
* Replace string when it is null
*
* @param input
* String to check
* @param replaceWith
* String that is used, when input is null
* @return replaced string
*/
private
static
String
stringNotNull
(
String
input
,
String
replaceWith
)
{
return
input
!=
null
?
input
:
replaceWith
;
}
/**
* Get a human readable name according to the type of the given requirements analysis object.
*
...
...
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