Package org.eclipse.ui.internal.intro.impl.model.url

Examples of org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser


    public AbstractIntroPage getCurrentLocationAsPage() {
        return getCurrentLocation().getPage();
    }

    public static boolean isURL(String aString) {
        IntroURLParser parser = new IntroURLParser(aString);
        if (parser.hasProtocol())
            return true;
        return false;
    }
View Full Code Here


        if (browser.getData("navigation") != null //$NON-NLS-1$
                && browser.getData("navigation").equals("true")) //$NON-NLS-1$ //$NON-NLS-2$
            return;

        IntroModelRoot model = implementation.getModel();
        IntroURLParser parser = new IntroURLParser(url);
        if (!parser.hasProtocol() || parser.getHost() == null
                || parser.getHost().equals("")) //$NON-NLS-1$
            // This will filter out two navigation events fired by the browser
            // on a setText. (about:blank and
            // res://C:\WINDOWS\System32\shdoclc.dll/navcancl.htm on windows,
            // and file:/// on Linux)
            return;
View Full Code Here

        String url = event.location;
        if (url == null)
            return;

        IntroModelRoot model = implementation.getModel();
        IntroURLParser parser = new IntroURLParser(url);
        if (parser.hasIntroUrl()) {
            // stop URL first.
            event.doit = false;
            // execute the action embedded in the IntroURL
            IntroURL introURL = parser.getIntroURL();
            introURL.execute();

            // In the case of dynamic Intro, guard against extra Frame
            // navigations. This can happen in the case of intro injected
            // IFrames or Frames included through intro xml content.
View Full Code Here

        label = getAttribute(element, ATT_LABEL);

        url = ModelUtil.resolveURL(base, url, bundle);
        if (url != null) {
            // check the URL.
            IntroURLParser parser = new IntroURLParser(url);
            if (parser.hasIntroUrl())
                introURL = parser.getIntroURL();
        }

        // There should be at most one img element.
        NodeList imgElements = element.getElementsByTagName(TAG_IMG);
        if (imgElements.getLength() > 0) {
View Full Code Here

     */
    public static String resolveURL(String base, String url, Bundle bundle) {
        // quick exit
        if (url == null)
            return null;
        IntroURLParser parser = new IntroURLParser(url);
        if (parser.hasProtocol())
            return url;
        // make plugin relative url. Only now we need the bundle.
        return BundleUtil.getResolvedResourceLocation(base, url, bundle);
    }
View Full Code Here

    private static void qualifyAttribute(Element element, String attributeName,
            String base, Bundle bundle) {
        if (element.hasAttribute(attributeName)) {
            String attributeValue = element.getAttribute(attributeName);
            if (new IntroURLParser(attributeValue).hasProtocol())
                return;

            // resolve the resource against the nl mechanism.
            String attributePath = BundleUtil.getResolvedResourceLocation(base,
                attributeValue, bundle);
View Full Code Here

        if (element.hasAttribute(ATT_VALUE)
                && element.hasAttribute(ATT_VALUE_TYPE)
                && element.getAttribute(ATT_VALUE_TYPE).equals("ref") //$NON-NLS-1$
                && element.getLocalName().equals(TAG_PARAM)) {
            String value = element.getAttribute(ATT_VALUE);
            if (new IntroURLParser(value).hasProtocol())
                return;
            // resolve the resource against the nl mechanism.
            String attributePath = BundleUtil.getResolvedResourceLocation(base,
                value, bundle);
            element.setAttribute(ATT_VALUE, attributePath);
View Full Code Here

     * @param url
     *            the url to construct an IntroURL from
     * @return an IntroURL, or <code>null</code> if the url is invalid
     */
    public static IIntroURL createIntroURL(String url) {
        IntroURLParser parser = new IntroURLParser(url);
        if (parser.hasIntroUrl()) {
            IntroURL introURL = parser.getIntroURL();
            return introURL;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser

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.