Changeset 136

Show
Ignore:
Timestamp:
08/27/08 19:20:13 (4 months ago)
Author:
mb0
Message:

NEW - # 107: flex.designview
http://axdt.org/ticket/107

added first implementation for review.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • axdt/trunk/org.axdt.feature/feature.xml

    r110 r136  
    6262         download-size="0" 
    6363         install-size="0" 
    64          version="0.0.0" 
    65          unpack="false"/> 
     64         version="0.0.0"/> 
    6665 
    6766   <plugin 
  • axdt/trunk/org.axdt.mxml/META-INF/MANIFEST.MF

    r123 r136  
    33Bundle-Name: Axdt Mxml Plug-in 
    44Bundle-SymbolicName: org.axdt.mxml; singleton:=true 
    5 Bundle-Version: 0.0.4 
     5Bundle-Version: 0.0.5 
    66Bundle-Activator: org.axdt.mxml.MxmlPlugin 
    77Bundle-Vendor: http://axdt.org 
     
    1212 org.eclipse.wst.sse.ui, 
    1313 org.eclipse.ui.navigator, 
    14  org.axdt.common 
     14 org.axdt.common, 
     15 org.eclipse.jface.text;bundle-version="3.4.0", 
     16 org.eclipse.wst.sse.core;bundle-version="1.1.300" 
    1517Eclipse-LazyStart: true 
    1618Bundle-ActivationPolicy: lazy 
  • axdt/trunk/org.axdt.mxml/build.properties

    r58 r136  
    66               icons/,\ 
    77               data/,\ 
    8                epl-v10.html 
     8               epl-v10.html,\ 
     9               designview/ 
  • axdt/trunk/org.axdt.mxml/plugin.xml

    r86 r136  
    3232            targetID="org.axdt.as3.perspective"> 
    3333         <newWizardShortcut 
    34                id="org.axdt.mxml.wizards.newWizard"> 
     34               id="org.axdt.mxml.wizards.newMxmlWizard"> 
    3535         </newWizardShortcut> 
    3636      </perspectiveExtension> 
     
    5050            class="org.axdt.mxml.preferences.MxmlPreferences"/> 
    5151   </extension> 
     52   <extension 
     53         point="org.eclipse.ui.editors"> 
     54      <editor 
     55            class="org.axdt.mxml.designer.MxmlDesignEditor" 
     56            contributorClass="org.axdt.mxml.designer.MxmlDesignEditorContributor" 
     57            default="false" 
     58            extensions="mxml" 
     59            icon="icons/mxml_file.gif" 
     60            id="org.axdt.mxml.designer" 
     61            name="Flex Designviewer"> 
     62      </editor> 
     63   </extension> 
    5264</plugin> 
  • axdt/trunk/org.axdt.mxml/src/org/axdt/mxml/MxmlPlugin.java

    r92 r136  
    11package org.axdt.mxml; 
    22 
     3import java.io.IOException; 
     4import java.net.URL; 
     5 
     6import org.eclipse.core.runtime.FileLocator; 
     7import org.eclipse.core.runtime.Path; 
     8import org.eclipse.core.runtime.Platform; 
    39import org.eclipse.core.runtime.preferences.ConfigurationScope; 
    410import org.eclipse.core.runtime.preferences.IScopeContext; 
     
    713import org.eclipse.ui.plugin.AbstractUIPlugin; 
    814import org.eclipse.ui.preferences.ScopedPreferenceStore; 
     15import org.osgi.framework.Bundle; 
    916import org.osgi.framework.BundleContext; 
    1017 
     
    7380                return imageDescriptorFromPlugin(PLUGIN_ID, path); 
    7481        } 
     82 
     83        public static URL getBundleURL(Path path) { 
     84                Bundle bundle = Platform.getBundle(PLUGIN_ID); 
     85                URL[] urls = FileLocator.findEntries(bundle, path); 
     86                if (urls.length < 1) return null; 
     87                try { 
     88                        return FileLocator.resolve(urls[0]); 
     89                } catch (IOException e) { 
     90                        e.printStackTrace(); 
     91                } 
     92                return null; 
     93        } 
    7594}