Package org.openquark.cal.services

Examples of org.openquark.cal.services.VaultElementInfo


     * @param pw the PrintWriter to output to.
     * @param workspace the source workspace.
     * @param moduleName
     */
    private void generateWorkspaceDeclarationLine(PrintWriter pw, CALWorkspace workspace, ModuleName moduleName) {
        VaultElementInfo vaultInfo = workspace.getVaultInfo(moduleName);
        if (vaultInfo instanceof VaultElementInfo.Basic) {
            pw.println(((VaultElementInfo.Basic)vaultInfo).toDeclarationString());
        } else {
            iceLogger.log(Level.INFO, "The module " + moduleName + " comes from the " + vaultInfo.getVaultDescriptor() + ", which is not handled by this command. Defaulting to use the StandardVault for this module.");
            pw.println("StandardVault " + moduleName);
        }
    }
View Full Code Here


     * Returns a line for a workspace declaration based on the given module name.
     * @param moduleName
     * @return a line for a workspace declaration.
     */
    private String getWorkspaceDeclarationLine(ModuleName moduleName) {
        VaultElementInfo vaultInfo = workspace.getVaultInfo(moduleName);
        if (vaultInfo instanceof VaultElementInfo.Basic) {
            return ((VaultElementInfo.Basic)vaultInfo).toDeclarationString();
        } else {
            return "StandardVault " + moduleName;
        }
View Full Code Here

        int nModules = moduleNames.length;
        if (nModules > 0) {
            for (int i = 0; i < nModules; i++) {
                details.append("     " + moduleNames[i]);
               
                VaultElementInfo vaultInfo = workspace.getVaultInfo(moduleNames[i]);

                if (vaultInfo != null) {
                    long moduleRevision = vaultInfo.getRevision();

                    String descriptor = vaultInfo.getVaultDescriptor();
                    String locationString = vaultInfo.getLocationString();
                   
                    details.append("     " + descriptor);
                    if (locationString != null) {
                        details.append("(" + locationString + ")");
                    }
View Full Code Here

         * Return a new action to sync a module to a given revision
         * @param moduleNameToSync the name of the module to sync with its vault.
         * @return Action the new action.
         */
        private Action getRevertModuleAction(final ModuleName moduleNameToSync) {
            final VaultElementInfo vaultInfo = gemCutter.getWorkspace().getVaultInfo(moduleNameToSync);
            boolean hasVaultInfo = vaultInfo != null;
           
            Action revertModuleAction = new AbstractAction (GemCutter.getResourceString("RevertModulePopup")) {
                private static final long serialVersionUID = 5546677553785665358L;

                public void actionPerformed(ActionEvent evt) {
                    int moduleRevision = vaultInfo.getRevision();       // shouldn't be null.
                    gemCutter.doSyncModulesUserAction(Collections.singletonList(new ModuleRevision(moduleNameToSync, moduleRevision)), true);
                }
            };
           
            // Calculate whether the action should be enabled..
View Full Code Here

TOP

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

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.