Package org.openquark.cal.metadata

Examples of org.openquark.cal.metadata.CALFeatureMetadata


    /**
     * {@inheritDoc}
     */
    void generateUsageDocInstanceIndexEntry(ScopedEntity documentedEntity, ClassInstance classInstance) {
        CALFeatureMetadata metadata = getMetadata(CALFeatureName.getClassInstanceFeatureName(classInstance), getLocale());
        CALDocComment docComment = classInstance.getCALDocComment();

        /// Generate the name of the class instance
        //
        currentPage
View Full Code Here


     * @param parent the component to get a tooltip for
     * @return the HTML formatted tooltip text describing the given entity
     */
    public static String getEntityToolTip(GemEntity gemEntity, ScopedEntityNamingPolicy namingPolicy, JComponent parent) {
        Locale locale = GemCutter.getLocaleFromPreferences();
        CALFeatureMetadata metadata = gemEntity.getMetadata(locale);
        return getEntityToolTip(gemEntity.getFunctionalAgent(), namingPolicy, metadata, parent, locale);
    }
View Full Code Here

     * @param parent the component to get a tooltip for
     * @return the HTML formatted tooltip text describing the given entity
     */
    public static String getEntityToolTip(ScopedEntity scopedEntity, ScopedEntityNamingPolicy namingPolicy, CALWorkspace workspace, JComponent parent) {
        Locale locale = GemCutter.getLocaleFromPreferences();
        CALFeatureMetadata metadata = workspace.getMetadata(scopedEntity, locale);
        return getEntityToolTip(scopedEntity, namingPolicy, metadata, parent, locale);
    }
View Full Code Here

        /**
         * @see javax.swing.undo.StateEditable#storeState(java.util.Hashtable)
         */
        public void storeState(Hashtable<Object, Object> state) {
            CALFeatureMetadata metadata = NavAddressHelper.getMetadata(NavigatorAdapter.this, address);           
            state.put(getKey(), metadata);
        }
View Full Code Here

        /**
         * @see javax.swing.undo.StateEditable#restoreState(java.util.Hashtable)
         */
        public void restoreState(Hashtable<?, ?> state) {

            CALFeatureMetadata savedState = (CALFeatureMetadata) state.get(getKey());
       
            if (savedState != null) {
           
                boolean success = NavAddressHelper.saveMetadata(NavigatorAdapter.this, address, savedState);
               
View Full Code Here

            NavTreeNode node = nodes.nextElement();

            if (node instanceof NavEntityNode) {
               
                NavAddress address = node.getAddress();
                CALFeatureMetadata metadata = NavAddressHelper.getMetadata(owner, address);
               
                if (metadata instanceof FunctionalAgentMetadata) {

                    boolean failed = false;
                    FunctionalAgentMetadata faMetadata = (FunctionalAgentMetadata) metadata;
View Full Code Here

     * @see org.openquark.gems.client.navigator.NavEditorSection#doSave()
     */
    @Override
    void doSave() {
       
        CALFeatureMetadata metadata = getMetadata();
       
        metadata.setDisplayName((String) getEditorValue(DISPLAY_NAME_KEY));
        metadata.setShortDescription((String) getEditorValue(SHORT_DESCRIPTION_KEY));
        metadata.setLongDescription((String) getEditorValue(LONG_DESCRIPTION_KEY));
        metadata.setAuthor((String) getEditorValue(AUTHOR_KEY));
        metadata.setVersion((String) getEditorValue(VERSION_KEY));

        Boolean preferred = (Boolean) getEditorValue(PREFERRED_KEY);
        metadata.setPreferred(preferred.booleanValue());
       
        Boolean expert = (Boolean) getEditorValue(EXPERT_KEY);
        metadata.setExpert(expert.booleanValue());
       
        metadata.clearRelatedFeatures();
        List<CALFeatureName> relatedFeatures = UnsafeCast.unsafeCast(getEditorValue(RELATED_FEATURES_KEY));     // ~ unsafe
        for (final CALFeatureName calFeatureName : relatedFeatures) {
            metadata.addRelatedFeature(calFeatureName);
        }
    }
View Full Code Here

    /**
     * @see org.openquark.gems.client.navigator.NavEditorSection#doRevert()
     */
    @Override
    void doRevert() {
        CALFeatureMetadata metadata = getMetadata();
       
        setEditorValue(DISPLAY_NAME_KEY,      metadata.getDisplayName());
        setEditorValue(SHORT_DESCRIPTION_KEY, metadata.getShortDescription());
        setEditorValue(LONG_DESCRIPTION_KEY,  metadata.getLongDescription());
        setEditorValue(AUTHOR_KEY,            metadata.getAuthor());
        setEditorValue(VERSION_KEY,           metadata.getVersion());
        setEditorValue(PREFERRED_KEY,         Boolean.valueOf(metadata.isPreferred()));
        setEditorValue(EXPERT_KEY,            Boolean.valueOf(metadata.isExpert()));
       
        List<CALFeatureName> relatedFeatures = new ArrayList<CALFeatureName>();
        int count = metadata.getNRelatedFeatures();
        for (int i = 0; i < count; i++) {
            relatedFeatures.add(metadata.getNthRelatedFeature(i));
        }
        setEditorValue(RELATED_FEATURES_KEY, relatedFeatures);
    }
View Full Code Here

        }
    }
   
    /** Set the specified return value description into the metadata. */
    private void setReturnValueDescriptionIntoMetadata(String returnValueDesc) {
        CALFeatureMetadata metadata = getMetadata();
        if (metadata instanceof FunctionMetadata) {
            ((FunctionMetadata)metadata).setReturnValueDescription(returnValueDesc);
           
        } else if (metadata instanceof ClassMethodMetadata) {
            ((ClassMethodMetadata)metadata).setReturnValueDescription(returnValueDesc);
View Full Code Here

        }
    }
   
    /** Get the return value description from the metadata. */
    private String getReturnValueDescriptionFromMetadata() {
        CALFeatureMetadata metadata = getMetadata();
        if (metadata instanceof FunctionMetadata) {
            return ((FunctionMetadata)metadata).getReturnValueDescription();
           
        } else if (metadata instanceof ClassMethodMetadata) {
            return ((ClassMethodMetadata)metadata).getReturnValueDescription();
View Full Code Here

TOP

Related Classes of org.openquark.cal.metadata.CALFeatureMetadata

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.