Package org.openquark.cal.services

Examples of org.openquark.cal.services.CALFeatureName


         * @param logger
         * @param fromName QualifiedName to change from
         * @param toName QualifiedName to change to
         */
        private void updateResourceNames(CompilerMessageLogger logger, QualifiedName fromName, QualifiedName toName) {
            CALFeatureName fromFeatureName = toCALFeatureName(fromName, logger);
            CALFeatureName toFeatureName = toCALFeatureName(toName, logger);
           
            if(fromFeatureName == null || toFeatureName == null) {
                // toCALFeatureName will have already logged an error for us
                return;
            }
View Full Code Here


         * @param logger CompilerMessageLogger for logging any failures
         * @return CALFeatureName of the qualifiedName (in the current category)
         */
        private CALFeatureName toCALFeatureName(QualifiedName qualifiedName, CompilerMessageLogger logger) {
           
            CALFeatureName cachedFeatureName = featureNameCache.get(qualifiedName);
            if(cachedFeatureName != null) {
                return cachedFeatureName;
            }
           
            if (category == SourceIdentifier.Category.MODULE_NAME) {
View Full Code Here

         */
        @Override
        final void generateFunctionOrClassMethodReference(final HTMLBuilder builder, final ScopedEntityReference reference) {
            final QualifiedName qualifiedName = reference.getName();
           
            CALFeatureName featureName;
            if (isClassMethodName(qualifiedName)) {
                featureName = CALFeatureName.getClassMethodFeatureName(qualifiedName);
            } else {
                featureName = CALFeatureName.getFunctionFeatureName(qualifiedName);
            }
View Full Code Here

     * @return that describes the location of the module.  This will normally
     *          be an absolute path to the file in the filesystem.
     */
    protected String getModulePath(ModuleName moduleName) {
       
        CALFeatureName moduleFeatureName = CALFeatureName.getModuleFeatureName(moduleName);
        ResourceName moduleResourceName = new ResourceName(moduleFeatureName);
       
        ResourceStore sourceStore = getWorkspaceManager().getWorkspace().getSourceManager(moduleName).getResourceStore();
       
        // If the source store doesn't know about this module, then we don't know how to find its file
View Full Code Here

     * @return A ModuleSourceDefinition object
     */
    private static ModuleSourceDefinition makeSourceDefFromBuiltIn (ModuleName builtInModuleName, CALWorkspace workspace) {
       
        final ResourceStore sourceStore = workspace.getSourceManager(builtInModuleName).getResourceStore();
        final CALFeatureName moduleFeatureName = CALFeatureName.getModuleFeatureName(builtInModuleName);
        final ResourceName moduleResourceName = new ResourceName(moduleFeatureName);
        return new ModuleSourceDefinition(builtInModuleName) {
            @Override
            public InputStream getInputStream(Status status) {
                return sourceStore.getInputStream(moduleResourceName);
View Full Code Here

     * @param moduleName the name of the module.
     * @return true if the specified module is a testing module; false otherwise.
     */
    private boolean isTestingModule(final ModuleName moduleName) {
        final ResourceStore sourceStore = workspace.getSourceManager(moduleName).getResourceStore();
        final CALFeatureName moduleFeatureName = CALFeatureName.getModuleFeatureName(moduleName);
        final ResourceName resourceName = new ResourceName(moduleFeatureName);
       
        // If the source store doesn't know about this module, then it is not a testing module
        // (because it wasn't loaded from disk)
        if (!sourceStore.hasFeature(resourceName)) {
View Full Code Here

         *          be an absolute path to the file in the filesystem.
         */
        private String getModulePath() {
           
            ModuleName moduleName = getModuleNameFromCurrentSourcePosition();
            CALFeatureName moduleFeatureName = CALFeatureName.getModuleFeatureName(moduleName);
            ResourceName moduleResourceName = new ResourceName(moduleFeatureName);
           
            ResourceStore sourceStore = perspective.getWorkspace().getSourceManager(moduleName).getResourceStore();
           
            // If the source store doesn't know about this module, then we don't know how to find its file
View Full Code Here

        Element sectionElement = document.createElement(MetadataPersistenceConstants.RELATED_FEATURES_SECTION_TAG);
        parentElement.appendChild(sectionElement);

        Iterator<CALFeatureName> relatedFeatures = this.relatedFeatures.iterator();
        while (relatedFeatures.hasNext()) {
            CALFeatureName featureName = relatedFeatures.next();
            featureName.saveXML(sectionElement);
        }
    }
View Full Code Here

        XMLPersistenceHelper.checkIsTagElement(metadataNode, MetadataPersistenceConstants.RELATED_FEATURES_SECTION_TAG);
        List<Element> featureNodes = XMLPersistenceHelper.getChildElements(metadataNode);
       
        for (final Element featureElement : featureNodes) {
            CALFeatureName featureName = CALFeatureName.getFromXML(featureElement);           
            relatedFeatures.add(featureName);
        }
    }
View Full Code Here

        // Get the gem definition.
        String gemDefinition = getGemDefinition(gemToSave, scope);
       
        // Get the gem metadata as functional agent metadata.
        CALFeatureName gemEntityFeatureName = CALFeatureName.getFunctionFeatureName(gemName);

        FunctionMetadata collectorMetadata = gemToSave.getDesignMetadata();
        FunctionMetadata newGemMetadata = new FunctionMetadata(gemEntityFeatureName, collectorMetadata.getLocale());
       
        collectorMetadata.copyTo(newGemMetadata);
View Full Code Here

TOP

Related Classes of org.openquark.cal.services.CALFeatureName

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.