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
363ee69b
Commit
363ee69b
authored
13 years ago
by
Christoph Döbber
Browse files
Options
Downloads
Patches
Plain Diff
ported property sections
refs 288
parent
3fd499a4
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/editor/TextEditorBase.java
+0
-116
0 additions, 116 deletions
...rc/org/fortiss/tooling/base/ui/editor/TextEditorBase.java
with
0 additions
and
116 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editor/TextEditorBase.java
deleted
100644 → 0
+
0
−
116
View file @
3fd499a4
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2011 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.tooling.base.ui.editor
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.emf.databinding.EMFDataBindingContext
;
import
org.eclipse.emf.ecore.EObject
;
import
org.eclipse.ui.IEditorInput
;
import
org.eclipse.ui.IEditorSite
;
import
org.eclipse.ui.PartInitException
;
import
org.eclipse.ui.editors.text.TextEditor
;
import
org.fortiss.tooling.kernel.service.ICommandStackService
;
import
org.fortiss.tooling.kernel.ui.extension.IModelEditor
;
import
org.fortiss.tooling.kernel.ui.extension.IModelElementHandler
;
/**
*
* @author doebber
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public
abstract
class
TextEditorBase
<
T
extends
EObject
>
extends
TextEditor
implements
IModelEditor
<
T
>
{
/**
* The object shown in this editor. This is valid as soon as
* {@link #init(IEditorSite, IEditorInput)} has been called.
*/
protected
T
editedObject
;
/** The model element handler to be used with the {@link #editedObject}. */
protected
IModelElementHandler
<
T
>
handler
;
/** Databinding context used for model changes. */
protected
final
EMFDataBindingContext
dbc
=
new
EMFDataBindingContext
();
/** Returns the edited object. */
@Override
public
T
getEditedObject
()
{
return
editedObject
;
}
/** {@inheritDoc} */
@SuppressWarnings
(
"unchecked"
)
@Override
public
void
init
(
IEditorSite
site
,
IEditorInput
input
)
throws
PartInitException
{
// if (!(input instanceof ModelElementEditorInput)) {
// throw new PartInitException("Expected input of type "
// + ModelElementEditorInput.class);
// }
// ModelElementEditorInput meInput = (ModelElementEditorInput) input;
//
// editedObject = (T) meInput.getModelElement();
// if (editedObject == null) {
// throw new PartInitException("Missing model element!");
// }
//
// handler = (IModelElementHandler<T>) meInput.getModelElementHandler();
// if (handler == null) {
// throw new PartInitException("Missing model element handler!");
// }
setSite
(
site
);
setInput
(
input
);
setPartName
(
handler
.
getName
(
editedObject
));
setContentDescription
(
handler
.
getDescription
(
editedObject
));
}
/** {@inheritDoc} */
@Override
public
final
boolean
isDirty
()
{
return
ICommandStackService
.
INSTANCE
.
isDirty
(
editedObject
);
}
/** {@inheritDoc} */
@Override
public
final
void
doSave
(
IProgressMonitor
monitor
)
{
ICommandStackService
.
INSTANCE
.
doSave
(
editedObject
,
monitor
);
}
/** {@inheritDoc} */
@Override
public
final
boolean
isSaveAsAllowed
()
{
return
false
;
}
/** {@inheritDoc} */
@Override
public
final
void
doSaveAs
()
{
// Saving is handled automatically by persistency service
}
/** {@inheritDoc} */
@Override
public
void
setFocus
()
{
// nothing to do
}
}
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