Skip to content

Commit

Permalink
Implemented response label and placement.
Browse files Browse the repository at this point in the history
Also changed to tab-separation in CSV (duh!).
  • Loading branch information
olas committed May 4, 2012
1 parent bf5a628 commit b2621b6
Show file tree
Hide file tree
Showing 74 changed files with 12,673 additions and 12,142 deletions.
2 changes: 1 addition & 1 deletion plugins/net.bioclipse.qsar.model.edit/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
6 changes: 6 additions & 0 deletions plugins/net.bioclipse.qsar.model.edit/plugin.properties
Expand Up @@ -450,3 +450,9 @@ _UI_DescriptorresultType_errorString_feature = Error String
_UI_ResourceType_containsErrors_feature = Contains Errors
_UI_StructureType_has2d_feature = Has2d
_UI_StructureType_has3d_feature = Has3d
_UI_ResponseType_name_feature = Name
_UI_ResponseType_placementFirst_feature = Placement First
_UI_ResponseType_label_feature = Label
_UI_ResponseType_placement_feature = Placement
_UI_MetadataType_responseLabel_feature = Response Label
_UI_MetadataType_responsePlacement_feature = Response Placement
Expand Up @@ -51,194 +51,194 @@ public class DescriptorTypeItemProvider
IItemLabelProvider,
IItemPropertySource {
/**
* <!-- begin-user-doc -->
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
public static final String copyright = " Copyright (c) 2009 Ola Spjuth\n All rights reserved. This program and the accompanying materials\n are made available under the terms of the Eclipse Public License v1.0\n which accompanies this distribution, and is available at\n http://www.eclipse.org/legal/epl-v10.html\n";

/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
public DescriptorTypeItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addIdPropertyDescriptor(object);
addOntologyidPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
addIdPropertyDescriptor(object);
addOntologyidPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Id feature.
* <!-- begin-user-doc -->
* This adds a property descriptor for the Id feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DescriptorType_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DescriptorType_id_feature", "_UI_DescriptorType_type"),
QsarPackage.Literals.DESCRIPTOR_TYPE__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DescriptorType_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DescriptorType_id_feature", "_UI_DescriptorType_type"),
QsarPackage.Literals.DESCRIPTOR_TYPE__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}

/**
* This adds a property descriptor for the Ontologyid feature.
* <!-- begin-user-doc -->
* This adds a property descriptor for the Ontologyid feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
protected void addOntologyidPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DescriptorType_ontologyid_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DescriptorType_ontologyid_feature", "_UI_DescriptorType_type"),
QsarPackage.Literals.DESCRIPTOR_TYPE__ONTOLOGYID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DescriptorType_ontologyid_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DescriptorType_ontologyid_feature", "_UI_DescriptorType_type"),
QsarPackage.Literals.DESCRIPTOR_TYPE__ONTOLOGYID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}

/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(QsarPackage.Literals.DESCRIPTOR_TYPE__PARAMETER);
childrenFeatures.add(QsarPackage.Literals.DESCRIPTOR_TYPE__PROVIDER);
}
return childrenFeatures;
}
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(QsarPackage.Literals.DESCRIPTOR_TYPE__PARAMETER);
childrenFeatures.add(QsarPackage.Literals.DESCRIPTOR_TYPE__PROVIDER);
}
return childrenFeatures;
}

/**
* <!-- begin-user-doc -->
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.

return super.getChildFeature(object, child);
}
return super.getChildFeature(object, child);
}

/**
* This returns DescriptorType.gif.
* <!-- begin-user-doc -->
* This returns DescriptorType.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/DescriptorType"));
}
return overlayImage(object, getResourceLocator().getImage("full/obj16/DescriptorType"));
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
public String getText(Object object) {
String label = ((DescriptorType)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_DescriptorType_type") :
getString("_UI_DescriptorType_type") + " " + label;
}
String label = ((DescriptorType)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_DescriptorType_type") :
getString("_UI_DescriptorType_type") + " " + label;
}

/**
* 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 -->
* 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
*/
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(DescriptorType.class)) {
case QsarPackage.DESCRIPTOR_TYPE__ID:
case QsarPackage.DESCRIPTOR_TYPE__ONTOLOGYID:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case QsarPackage.DESCRIPTOR_TYPE__PARAMETER:
case QsarPackage.DESCRIPTOR_TYPE__PROVIDER:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
updateChildren(notification);

switch (notification.getFeatureID(DescriptorType.class)) {
case QsarPackage.DESCRIPTOR_TYPE__ID:
case QsarPackage.DESCRIPTOR_TYPE__ONTOLOGYID:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case QsarPackage.DESCRIPTOR_TYPE__PARAMETER:
case QsarPackage.DESCRIPTOR_TYPE__PROVIDER:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
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 -->
* 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
*/
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
super.collectNewChildDescriptors(newChildDescriptors, object);

newChildDescriptors.add
(createChildParameter
(QsarPackage.Literals.DESCRIPTOR_TYPE__PARAMETER,
QsarFactory.eINSTANCE.createParameterType()));
newChildDescriptors.add
(createChildParameter
(QsarPackage.Literals.DESCRIPTOR_TYPE__PARAMETER,
QsarFactory.eINSTANCE.createParameterType()));

newChildDescriptors.add
(createChildParameter
(QsarPackage.Literals.DESCRIPTOR_TYPE__PROVIDER,
""));
}
newChildDescriptors.add
(createChildParameter
(QsarPackage.Literals.DESCRIPTOR_TYPE__PROVIDER,
""));
}

/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return QsarmodelEditPlugin.INSTANCE;
}
return QsarmodelEditPlugin.INSTANCE;
}

}

0 comments on commit b2621b6

Please sign in to comment.