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
399f6fb5
Commit
399f6fb5
authored
12 years ago
by
Daniel Ratiu
Browse files
Options
Downloads
Patches
Plain Diff
small improvements
parent
9845260f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+64
-72
64 additions, 72 deletions
...nk/src/org/fortiss/tooling/base/ui/utils/StatusUtils.java
with
64 additions
and
72 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/StatusUtils.java
+
64
−
72
View file @
399f6fb5
/*--------------------------------------------------------------------------+
/*--------------------------------------------------------------------------+
$Id: StatusUtils.java 5274 2012-08-02 07:54:11Z gareis $
$Id: StatusUtils.java 5274 2012-08-02 07:54:11Z gareis $
| |
| |
| Copyright 2011 ForTISS GmbH |
| Copyright 2011 ForTISS GmbH |
| |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| You may obtain a copy of the License at |
| |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| |
| Unless required by applicable law or agreed to in writing, software |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| limitations under the License. |
+--------------------------------------------------------------------------*/
+--------------------------------------------------------------------------*/
package
org.fortiss.tooling.base.ui.utils
;
package
org.fortiss.tooling.base.ui.utils
;
import
org.eclipse.jface.action.IStatusLineManager
;
import
static
org
.
conqat
.
ide
.
commons
.
ui
.
ui
.
WorkbenchUtils
.
getActiveWorkbenchPage
;
import
org.eclipse.ui.IActionBars
;
import
org.eclipse.ui.IViewSite
;
import
org.eclipse.jface.action.IStatusLineManager
;
import
org.eclipse.ui.IWorkbenchPage
;
import
org.eclipse.ui.IActionBars
;
import
org.eclipse.ui.IWorkbenchPart
;
import
org.eclipse.ui.IViewSite
;
import
org.eclipse.ui.IWorkbenchPartSite
;
import
org.eclipse.ui.IWorkbenchPage
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.eclipse.ui.IWorkbenchPart
;
import
org.eclipse.ui.PlatformUI
;
import
org.eclipse.ui.IWorkbenchPartSite
;
/**
/**
* Methods for accessing the status line
* Methods for accessing the status line
*
*
* @author gareis
* @author gareis
* @author $Author: gareis $
* @author $Author: gareis $
* @version $Rev: 18709 $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
* @ConQAT.Rating YELLOW Hash: 8E2E1AD408AAAE041B6043220648FE3D
*/
*/
public
class
StatusUtils
{
public
class
StatusUtils
{
/** Returns a Status Line object of the current window */
/** Returns a Status Line object of the current window */
public
static
IStatusLineManager
getStatusLine
()
{
public
static
IStatusLineManager
getStatusLine
()
{
IWorkbenchPage
page
=
getActiveWorkbenchPage
();
IWorkbenchWindow
window
=
PlatformUI
.
getWorkbench
().
getActiveWorkbenchWindow
();
IWorkbenchPart
part
=
page
.
getActivePart
();
IWorkbenchPartSite
site
=
part
.
getSite
();
IWorkbenchPage
page
=
window
.
getActivePage
();
IViewSite
vSite
=
(
IViewSite
)
site
;
IActionBars
actionBars
=
vSite
.
getActionBars
();
IWorkbenchPart
part
=
page
.
getActivePart
();
IWorkbenchPartSite
site
=
part
.
getSite
();
if
(
actionBars
==
null
)
{
return
null
;
IViewSite
vSite
=
(
IViewSite
)
site
;
}
IActionBars
actionBars
=
vSite
.
getActionBars
();
IStatusLineManager
statusLine
=
actionBars
.
getStatusLineManager
();
if
(
statusLine
==
null
)
{
if
(
actionBars
==
null
)
return
null
;
return
null
;
}
return
statusLine
;
IStatusLineManager
statusLine
=
actionBars
.
getStatusLineManager
();
}
if
(
statusLine
==
null
)
{
/** Writes messages into the status line of the current window */
return
null
;
public
static
void
setStatusMessage
(
String
message
)
{
}
if
(
getStatusLine
()
!=
null
)
{
return
statusLine
;
getStatusLine
().
setMessage
(
message
);
}
}
}
}
/** writes messages into the status line of the current window */
public
static
void
setStatusMessage
(
String
message
)
{
if
(
getStatusLine
()
!=
null
)
getStatusLine
().
setMessage
(
message
);
}
}
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