Package org.locationtech.udig.project.element

Examples of org.locationtech.udig.project.element.IGenericProjectElement


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated NOT
     */
    public synchronized void setBackingObject(IGenericProjectElement newBackingObject) {
        IGenericProjectElement oldBackingObject = backingObject;
        backingObject = newBackingObject;
        newBackingObject.setProjectElementAdapter(this);
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    ElementPackage.PROJECT_ELEMENT_ADAPTER__BACKING_OBJECT, oldBackingObject,
View Full Code Here


     */
    public IGenericProjectElement createIGenericProjectElementFromString(EDataType eDataType,
            String initialValue) {
        try {
            UdigMemento memento = UdigMemento.readString(initialValue);
            IGenericProjectElement backingObject = createGenericProjectElement(
                    IGenericProjectElement.class, memento.getString(EXTENSION_POINT_ID_KEY));
            backingObject.init(memento);
            return backingObject;
        } catch (IOException e) {
            ProjectPlugin.log("Error parsing memento data for IGenericProject Element", e); //$NON-NLS-1$
            return null;
        }
View Full Code Here

    /**
     * Uses the IMemento pattern to obtain persistence data from the object
     * @generated NO MORE
     */
    public String convertIGenericProjectElementToString(EDataType eDataType, Object instanceValue) {
        IGenericProjectElement elem = (IGenericProjectElement) instanceValue;
        UdigMemento memento = new UdigMemento();
        elem.save(memento);
        memento.putString(EXTENSION_POINT_ID_KEY, elem.getExtensionId());
        return memento.toString();
    }
View Full Code Here

    public ProjectElementAdapter createProjectElementAdapter(IProject project,
            Class<? extends IGenericProjectElement> typeToCreate, String extensionId) {
        ProjectElementAdapter adapter = createProjectElementAdapter();

        IGenericProjectElement genericProjectElement = createGenericProjectElement(typeToCreate,
                extensionId);
        adapter.setBackingObject(genericProjectElement);

        ((Project) project).getElementsInternal().add(adapter);
        return adapter;
View Full Code Here

    public ProjectElementAdapter createProjectElementAdapter(IProject project, String elemName,
            Class<? extends IGenericProjectElement> typeToCreate, String extensionId) {
        ProjectElementAdapter adapter = createProjectElementAdapter();
        adapter.setName(elemName);

        IGenericProjectElement genericProjectElement = createGenericProjectElement(typeToCreate,
                extensionId);
        adapter.setBackingObject(genericProjectElement);

        ((Project) project).getElementsInternal().add(adapter);
        return adapter;
View Full Code Here

     * IColorProvider interface the foreground color from the provider is
     * returned otherwise null is returned
     */
    public Color getForeground(Object object) {
        ProjectElementAdapter projectElementAdapter = ((ProjectElementAdapter) object);
        IGenericProjectElement backingObject = projectElementAdapter.getBackingObject();
        if (backingObject == null) {
            return null;
        }
        String extensionId = backingObject.getExtensionId();
        IConfigurationElement extension = findExtension(extensionId);
        String labelProviderAtt = extension.getAttribute(LABEL_PROVIDER_ATT);
        Color color = null;
        if (labelProviderAtt != null) {
            try {
View Full Code Here

     * IColorProvider interface the background color from the provider is
     * returned otherwise null is returned
     */
    public Color getBackground(Object object) {
        ProjectElementAdapter projectElementAdapter = ((ProjectElementAdapter) object);
        IGenericProjectElement backingObject = projectElementAdapter.getBackingObject();
        if (backingObject == null) {
            return null;
        }
        String extensionId = backingObject.getExtensionId();
        IConfigurationElement extension = findExtension(extensionId);
        String labelProviderAtt = extension.getAttribute(LABEL_PROVIDER_ATT);
        Color color = null;
        if (labelProviderAtt != null) {
            try {
View Full Code Here

     * IFontProvider interface the font from the provider is returned otherwise
     * null is returned
     */
    public Font getFont(Object object) {
        ProjectElementAdapter projectElementAdapter = ((ProjectElementAdapter) object);
        IGenericProjectElement backingObject = projectElementAdapter.getBackingObject();
        if (backingObject == null) {
            return null;
        }
        String extensionId = backingObject.getExtensionId();
        IConfigurationElement extension = findExtension(extensionId);
        String labelProviderAtt = extension.getAttribute(LABEL_PROVIDER_ATT);
        Font font = null;
        if (labelProviderAtt != null) {
            try {
View Full Code Here

     *
     * @generated NOT
     */
    public Object getImage(Object object) {
        ProjectElementAdapter projectElementAdapter = ((ProjectElementAdapter) object);
        IGenericProjectElement backingObject = projectElementAdapter.getBackingObject();
        if (backingObject == null) {
            return null;
        }
        String extensionId = backingObject.getExtensionId();
        IConfigurationElement extension = findExtension(extensionId);
        String labelProviderAtt = extension.getAttribute(LABEL_PROVIDER_ATT);
        Object image = null;
        if (labelProviderAtt != null) {
            try {
View Full Code Here

     *
     * @generated NOT
     */
    public String getText(Object object) {
        ProjectElementAdapter projectElementAdapter = ((ProjectElementAdapter) object);
        IGenericProjectElement backingObject = projectElementAdapter.getBackingObject();
        if (backingObject == null) {
            return projectElementAdapter.getName() + "- No backing object";
        }
        String extensionId = backingObject.getExtensionId();
        IConfigurationElement extension = findExtension(extensionId);
        String labelProviderAtt = extension.getAttribute(LABEL_PROVIDER_ATT);
        String text = null;
        if (labelProviderAtt != null) {
            try {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.element.IGenericProjectElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.