/*******************************************************************************
- * Copyright (c) 2010 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import java.util.Arrays;
import org.eclipse.core.resources.IFolder;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource2;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
/**
* Implementation of the model element for the experiment folder.
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The name of the experiment folder.
*/
private static final String sfPath = "path"; //$NON-NLS-1$
private static final String sfLocation = "location"; //$NON-NLS-1$
- private static final TextPropertyDescriptor sfNameDescriptor = new TextPropertyDescriptor(sfName, sfName);
- private static final TextPropertyDescriptor sfPathDescriptor = new TextPropertyDescriptor(sfPath, sfPath);
- private static final TextPropertyDescriptor sfLocationDescriptor = new TextPropertyDescriptor(sfLocation, sfLocation);
+ private static final ReadOnlyTextPropertyDescriptor sfNameDescriptor = new ReadOnlyTextPropertyDescriptor(sfName, sfName);
+ private static final ReadOnlyTextPropertyDescriptor sfPathDescriptor = new ReadOnlyTextPropertyDescriptor(sfPath, sfPath);
+ private static final ReadOnlyTextPropertyDescriptor sfLocationDescriptor = new ReadOnlyTextPropertyDescriptor(sfLocation, sfLocation);
private static final IPropertyDescriptor[] sfDescriptors = { sfNameDescriptor, sfPathDescriptor, sfLocationDescriptor };
// ------------------------------------------------------------------------
// TmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
- */
+
@Override
public IFolder getResource() {
return (IFolder) fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
@Override
public TmfProjectElement getProject() {
return (TmfProjectElement) getParent();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
- */
@Override
public void refresh() {
TmfProjectElement project = (TmfProjectElement) getParent();
// ------------------------------------------------------------------------
// IPropertySource2
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
+
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
- return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;
+ return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
+
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
+
@Override
public void setPropertyValue(Object id, Object value) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
- */
+
@Override
public boolean isPropertyResettable(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
- */
+
@Override
public boolean isPropertySet(Object id) {
return false;
}
}
-