Package org.auraframework.system

Examples of org.auraframework.system.Location


            return access;
        }

        @Override
        public RefBuilderImpl<T, A> setLocation(String fileName, int line, int column, long lastModified) {
            location = new Location(fileName, line, column, lastModified);
            return this;
        }
View Full Code Here


            return this;
        }

        @Override
        public RefBuilderImpl<T, A> setLocation(String fileName, long lastModified) {
            location = new Location(fileName, lastModified);
            return this;
        }
View Full Code Here

                return;
            }
            if (cause instanceof QuickFixException) {
                this.parseError = (QuickFixException)cause;
            } else {
                Location location = null;

                if (cause instanceof AuraExceptionInfo) {
                    AuraExceptionInfo aei = (AuraExceptionInfo)cause;
                    location = aei.getLocation();
                }
View Full Code Here

        eventDefs.put("fakey", vendor.makeRegisterEventDef());

        List<ComponentDefRef> children = new ArrayList<>();
        children.add(vendor.makeComponentDefRef());

        Location location = vendor.makeLocation();

        DefDescriptor<ModelDef> modelDesc = vendor.getModelDescriptor();

        @SuppressWarnings("unchecked")
        DefDescriptor<T> extendsDesc = (DefDescriptor<T>) vendor.makeBaseComponentDefWithNulls(getDefClass(),
View Full Code Here

                        interfaces, null, null, null, false, false).hashCode());
    }

    public void testEquals() throws Exception {
        String desc = getAuraTestingUtil().getNonce("test:cmp");
        Location location = vendor.makeLocation("filename1", 5, 5, 0);
        BaseComponentDef bcd1 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, null, null, null, null, null, false, false);
        BaseComponentDef bcd2 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, null, null, null, null, null, false, false);
        assertTrue("The BaseComponentDefs should have been equal", bcd1.equals(bcd2));
View Full Code Here

    public void testEqualsWithDifferentController() throws Exception {
        DefDescriptor<ControllerDef> controllerDesc = DefDescriptorImpl.getInstance("java://foo.bar2",
                ControllerDef.class);
        String desc = getAuraTestingUtil().getNonce("test:cmp");
        Location location = vendor.makeLocation("filename1", 5, 5, 0);
        BaseComponentDef bcd1 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, null, null, null, null, null, false, false);
        BaseComponentDef bcd2 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, controllerDesc, null, null, null, null, null, null, false, false);
        assertFalse("A BaseComponentDef shouldn't be equal with different controllers", bcd1.equals(bcd2));
View Full Code Here

    }

    public void testEqualsWithDifferentParents() throws Exception {
        DefDescriptor<T> parentDesc = DefDescriptorImpl.getInstance("fake:componentParent2", getDefClass());
        String desc = getAuraTestingUtil().getNonce("test:cmp");
        Location location = vendor.makeLocation("filename1", 5, 5, 0);
        BaseComponentDef bcd1 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, null, null, null, null, null, false, false);
        BaseComponentDef bcd2 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, parentDesc, null, null, null, null, false, false);
        assertFalse("A BaseComponentDef shouldn't be equal with different parents", bcd1.equals(bcd2));
View Full Code Here

    public void testEqualsWithDifferentEvents() throws Exception {
        DefDescriptor<EventDef> eventDefDescriptor = DefDescriptorImpl.getInstance("fake:event2", EventDef.class);
        Map<String, RegisterEventDef> eventDefs = ImmutableMap.of("fakey2",
                (RegisterEventDef) vendor.makeRegisterEventDef(eventDefDescriptor, false, null));
        String desc = getAuraTestingUtil().getNonce("test:cmp");
        Location location = vendor.makeLocation("filename1", 5, 5, 0);
        BaseComponentDef bcd1 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, null, null, location, null, null, null, null, null, null, null, false, false);
        BaseComponentDef bcd2 = vendor.makeBaseComponentDefWithNulls(getDefClass(),
                desc, null, eventDefs, null, location, null, null, null, null, null, null, null, false, false);
        assertFalse("A BaseComponentDef shouldn't be equal with different registered events", bcd1.equals(bcd2));
View Full Code Here

        String type = getAttributeValue(ATTRIBUTE_TYPE);
        if (AuraTextUtil.isNullEmptyOrWhitespace(type)) {
            error("type attribute is required on registerevent");
        }
       
        Location location = getLocation();
        DefDescriptor<EventDef> eventDefDescriptor = DefDescriptorImpl.getInstance(type, EventDef.class);
       
        // validation on descriptor and such.
        builder.setDescription(getAttributeValue(RootTagHandler.ATTRIBUTE_DESCRIPTION));
        builder.setLocation(location);
View Full Code Here

            }
            if (location.startsWith("file:")) {
                location = location.substring(5);
            }
            URL cacheUrl = source.getCacheUrl();
            return new Location(location, xmlLocation.getLineNumber() - 1, xmlLocation.getColumnNumber(),
                    source.getLastModified(), cacheUrl == null ? null : cacheUrl.toString());
        } else if (source != null) {
            return new Location(source.getSystemId(), source.getLastModified());
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.auraframework.system.Location

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.