-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from arsysop/4-1
Improve Decl domain to cover vector example #4
- Loading branch information
Showing
18 changed files
with
1,123 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
425 changes: 417 additions & 8 deletions
425
bundles/ru.arsysop.loft.cast.decl.ecore/representations.aird
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
...t/src-gen/ru/arsysop/loft/cast/decl/edit/providers/CxxMethodTemplateDeclItemProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
/** | ||
* Copyright (c) 2022 ArSysOp | ||
* | ||
* 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. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Contributors: | ||
* ArSysOp - initial API and implementation | ||
* | ||
*/ | ||
package ru.arsysop.loft.cast.decl.edit.providers; | ||
|
||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.eclipse.emf.common.notify.AdapterFactory; | ||
import org.eclipse.emf.common.notify.Notification; | ||
import org.eclipse.emf.ecore.provider.EcoreEditPlugin; | ||
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | ||
import org.eclipse.emf.edit.provider.StyledString; | ||
|
||
import ru.arsysop.loft.cast.decl.model.api.CxxMethodTemplateDecl; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link ru.arsysop.loft.cast.decl.model.api.CxxMethodTemplateDecl} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class CxxMethodTemplateDeclItemProvider extends NamedDeclItemProvider { | ||
/** | ||
* This constructs an instance from a factory and a notifier. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public CxxMethodTemplateDeclItemProvider(AdapterFactory adapterFactory) { | ||
super(adapterFactory); | ||
} | ||
|
||
/** | ||
* This returns the property descriptors for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { | ||
if (itemPropertyDescriptors == null) { | ||
super.getPropertyDescriptors(object); | ||
|
||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* @generated NOT | ||
*/ | ||
@Override | ||
public Object getImage(Object object) { | ||
return overlayImage(object, EcoreEditPlugin.INSTANCE.getImage("full/obj16/EObject")); //$NON-NLS-1$ | ||
} | ||
|
||
/** | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected boolean shouldComposeCreationImage() { | ||
return true; | ||
} | ||
|
||
/** | ||
* This returns the label text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public String getText(Object object) { | ||
return ((StyledString)getStyledText(object)).getString(); | ||
} | ||
|
||
/** | ||
* This returns the label styled text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public Object getStyledText(Object object) { | ||
String label = ((CxxMethodTemplateDecl)object).getName(); | ||
StyledString styledLabel = new StyledString(); | ||
if (label == null || label.length() == 0) { | ||
styledLabel.append(getString("_UI_CxxMethodTemplateDecl_type"), StyledString.Style.QUALIFIER_STYLER); //$NON-NLS-1$ | ||
} else { | ||
styledLabel.append(getString("_UI_CxxMethodTemplateDecl_type"), StyledString.Style.QUALIFIER_STYLER).append(" " + label); //$NON-NLS-1$ //$NON-NLS-2$ | ||
} | ||
return styledLabel; | ||
} | ||
|
||
/** | ||
* This handles model notifications by calling {@link #updateChildren} to update any cached | ||
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public void notifyChanged(Notification notification) { | ||
updateChildren(notification); | ||
super.notifyChanged(notification); | ||
} | ||
|
||
/** | ||
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children | ||
* that can be created under this object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { | ||
super.collectNewChildDescriptors(newChildDescriptors, object); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...ft.cast.decl.model/src-gen/ru/arsysop/loft/cast/decl/model/api/CxxMethodTemplateDecl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* Copyright (c) 2022 ArSysOp | ||
* | ||
* 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. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Contributors: | ||
* ArSysOp - initial API and implementation | ||
* | ||
*/ | ||
package ru.arsysop.loft.cast.decl.model.api; | ||
|
||
|
||
/** | ||
* <!-- begin-user-doc --> | ||
* A representation of the model object '<em><b>Cxx Method Template Decl</b></em>'. | ||
* <!-- end-user-doc --> | ||
* | ||
* <p> | ||
* The following features are supported: | ||
* </p> | ||
* <ul> | ||
* <li>{@link ru.arsysop.loft.cast.decl.model.api.CxxMethodTemplateDecl#getClassTemplate <em>Class Template</em>}</li> | ||
* </ul> | ||
* | ||
* @see ru.arsysop.loft.cast.decl.model.meta.DeclPackage#getCxxMethodTemplateDecl() | ||
* @model | ||
* @generated | ||
*/ | ||
public interface CxxMethodTemplateDecl extends NamedDecl { | ||
/** | ||
* Returns the value of the '<em><b>Class Template</b></em>' container reference. | ||
* It is bidirectional and its opposite is '{@link ru.arsysop.loft.cast.decl.model.api.ClassTemplateDecl#getMethods <em>Methods</em>}'. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @return the value of the '<em>Class Template</em>' container reference. | ||
* @see #setClassTemplate(ClassTemplateDecl) | ||
* @see ru.arsysop.loft.cast.decl.model.meta.DeclPackage#getCxxMethodTemplateDecl_ClassTemplate() | ||
* @see ru.arsysop.loft.cast.decl.model.api.ClassTemplateDecl#getMethods | ||
* @model opposite="methods" required="true" transient="false" | ||
* @generated | ||
*/ | ||
ClassTemplateDecl getClassTemplate(); | ||
|
||
/** | ||
* Sets the value of the '{@link ru.arsysop.loft.cast.decl.model.api.CxxMethodTemplateDecl#getClassTemplate <em>Class Template</em>}' container reference. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @param value the new value of the '<em>Class Template</em>' container reference. | ||
* @see #getClassTemplate() | ||
* @generated | ||
*/ | ||
void setClassTemplate(ClassTemplateDecl value); | ||
|
||
} // CxxMethodTemplateDecl |
Oops, something went wrong.