/////////////////////////////////////////////////////////////////////////
762534
public static void deleteRole(DbConn cnx, int id, boolean force)
    {
        if (force)
        {
            cnx.runUpdate("user_remove_role", id);
        }
        else
        {
            int userUsingRole = cnx.runSelectSingle("user_select_count_using_role", Integer.class, id);
            if (userUsingRole > 0)
            {
                cnx.setRollbackOnly();
                throw new JqmAdminApiUserException(
                        "cannot delete a role currently attributed to a user. Remove role attribution of use force parameter.");
            }
        }

        QueryResult qr = cnx.runUpdate("role_delete_by_id", id);
        if (qr.nbUpdated != 1)
        {
            cnx.setRollbackOnly();
            throw new JqmAdminApiUserException("no item with ID " + id);
        }
    }
643013
public void getNewOptions(final String clientId, final I_CmsSimpleCallback<CmsDialogOptionsAndInfo> callback) {

        CmsRpcAction<CmsDialogOptionsAndInfo> action = new CmsRpcAction<CmsDialogOptionsAndInfo>() {

            @Override
            public void execute() {

                getContainerpageService().getNewOptions(
                    clientId,
                    getData().getRpcContext().getPageStructureId(),
                    getData().getRequestParams(),
                    this);
            }

            @Override
            protected void onResponse(CmsDialogOptionsAndInfo result) {

                callback.execute(result);
            }
        };

        action.execute();
    }
4310
private void createDayPanel() {

        CmsCheckBox box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_MONDAY_0));
        box.setInternalValue(WeekDay.MONDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_TUESDAY_0));
        box.setInternalValue(WeekDay.TUESDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_WEDNESDAY_0));
        box.setInternalValue(WeekDay.WEDNESDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_THURSDAY_0));
        box.setInternalValue(WeekDay.THURSDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_FRIDAY_0));
        box.setInternalValue(WeekDay.FRIDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_SATURDAY_0));
        box.setInternalValue(WeekDay.SATURDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_SUNDAY_0));
        box.setInternalValue(WeekDay.SUNDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
    }
901454
@Override
    public void init(String webAppRfsPath, String servletMapping, String defaultWebApplication) {

        try {
            super.init(webAppRfsPath, servletMapping, defaultWebApplication);
            CmsUpdateInfo.INSTANCE.setAdeModuleVersion(getInstalledModules().get("org.opencms.ade.containerpage"));

            if (m_workplaceUpdateThread != null) {
                if (m_workplaceUpdateThread.isAlive()) {
                    m_workplaceUpdateThread.kill();
                }
                m_workplaceUpdateThread = null;
            }
            if (m_dbUpdateThread != null) {
                if (m_dbUpdateThread.isAlive()) {
                    m_dbUpdateThread.kill();
                }
                m_dbUpdateThread = null;
                m_newLoggingOffset = 0;
                m_oldLoggingOffset = 0;
            }
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
1038962
private void setListIdForColumn(CmsListColumnDefinition col) {

        col.setListId(getListId());
        // default actions
        Iterator<CmsListDefaultAction> itDefaultActions = col.getDefaultActions().iterator();
        while (itDefaultActions.hasNext()) {
            itDefaultActions.next().setListId(getListId());
        }
        // direct actions
        Iterator<I_CmsListDirectAction> itDirectActions = col.getDirectActions().iterator();
        while (itDirectActions.hasNext()) {
            itDirectActions.next().setListId(getListId());
        }
    }
217867
function() {

        var defEvents = Calendar._EVENT_TYPES,
            CE = YAHOO.util.CustomEvent,
            cal = this; // To help with minification

        /**
        * Fired before a date selection is made
        * @event beforeSelectEvent
        */
        cal.beforeSelectEvent = new CE(defEvents.BEFORE_SELECT); 

        /**
        * Fired when a date selection is made
        * @event selectEvent
        * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
        */
        cal.selectEvent = new CE(defEvents.SELECT);

        /**
        * Fired before a date or set of dates is deselected
        * @event beforeDeselectEvent
        */
        cal.beforeDeselectEvent = new CE(defEvents.BEFORE_DESELECT);

        /**
        * Fired when a date or set of dates is deselected
        * @event deselectEvent
        * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
        */
        cal.deselectEvent = new CE(defEvents.DESELECT);
    
        /**
        * Fired when the Calendar page is changed
        * @event changePageEvent
        * @param {Date} prevDate The date before the page was changed
        * @param {Date} newDate The date after the page was changed
        */
        cal.changePageEvent = new CE(defEvents.CHANGE_PAGE);
    
        /**
        * Fired before the Calendar is rendered
        * @event beforeRenderEvent
        */
        cal.beforeRenderEvent = new CE(defEvents.BEFORE_RENDER);
    
        /**
        * Fired when the Calendar is rendered
        * @event renderEvent
        */
        cal.renderEvent = new CE(defEvents.RENDER);

        /**
        * Fired just before the Calendar is to be destroyed
        * @event beforeDestroyEvent
        */
        cal.beforeDestroyEvent = new CE(defEvents.BEFORE_DESTROY);

        /**
        * Fired after the Calendar is destroyed. This event should be used
        * for notification only. When this event is fired, important Calendar instance
        * properties, dom references and event listeners have already been 
        * removed/dereferenced, and hence the Calendar instance is not in a usable 
        * state.
        *
        * @event destroyEvent
        */
        cal.destroyEvent = new CE(defEvents.DESTROY);

        /**
        * Fired when the Calendar is reset
        * @event resetEvent
        */
        cal.resetEvent = new CE(defEvents.RESET);

        /**
        * Fired when the Calendar is cleared
        * @event clearEvent
        */
        cal.clearEvent = new CE(defEvents.CLEAR);

        /**
        * Fired just before the Calendar is to be shown
        * @event beforeShowEvent
        */
        cal.beforeShowEvent = new CE(defEvents.BEFORE_SHOW);

        /**
        * Fired after the Calendar is shown
        * @event showEvent
        */
        cal.showEvent = new CE(defEvents.SHOW);

        /**
        * Fired just before the Calendar is to be hidden
        * @event beforeHideEvent
        */
        cal.beforeHideEvent = new CE(defEvents.BEFORE_HIDE);

        /**
        * Fired after the Calendar is hidden
        * @event hideEvent
        */
        cal.hideEvent = new CE(defEvents.HIDE);

        /**
        * Fired just before the CalendarNavigator is to be shown
        * @event beforeShowNavEvent
        */
        cal.beforeShowNavEvent = new CE(defEvents.BEFORE_SHOW_NAV);
    
        /**
        * Fired after the CalendarNavigator is shown
        * @event showNavEvent
        */
        cal.showNavEvent = new CE(defEvents.SHOW_NAV);
    
        /**
        * Fired just before the CalendarNavigator is to be hidden
        * @event beforeHideNavEvent
        */
        cal.beforeHideNavEvent = new CE(defEvents.BEFORE_HIDE_NAV);
    
        /**
        * Fired after the CalendarNavigator is hidden
        * @event hideNavEvent
        */
        cal.hideNavEvent = new CE(defEvents.HIDE_NAV);

        /**
        * Fired just before the CalendarNavigator is to be rendered
        * @event beforeRenderNavEvent
        */
        cal.beforeRenderNavEvent = new CE(defEvents.BEFORE_RENDER_NAV);

        /**
        * Fired after the CalendarNavigator is rendered
        * @event renderNavEvent
        */
        cal.renderNavEvent = new CE(defEvents.RENDER_NAV);

        cal.beforeSelectEvent.subscribe(cal.onBeforeSelect, this, true);
        cal.selectEvent.subscribe(cal.onSelect, this, true);
        cal.beforeDeselectEvent.subscribe(cal.onBeforeDeselect, this, true);
        cal.deselectEvent.subscribe(cal.onDeselect, this, true);
        cal.changePageEvent.subscribe(cal.onChangePage, this, true);
        cal.renderEvent.subscribe(cal.onRender, this, true);
        cal.resetEvent.subscribe(cal.onReset, this, true);
        cal.clearEvent.subscribe(cal.onClear, this, true);
    }
819036
void submit() {

        CmsObject cms = A_CmsUI.getCmsObject();
        try {
            List<CmsUUID> changedIds = Lists.newArrayList();
            CmsResourceDeleteMode mode = (CmsResourceDeleteMode)m_deleteSiblings.getValue();
            for (CmsResource resource : m_context.getResources()) {
                changedIds.add(resource.getStructureId());
                CmsLockActionRecord lockRecord = CmsLockUtil.ensureLock(cms, resource);
                try {
                    cms.deleteResource(cms.getSitePath(resource), mode);
                } finally {
                    if (lockRecord.getChange().equals(LockChange.locked)) {
                        if (!resource.getState().isNew()) {
                            try {
                                cms.unlockResource(resource);
                            } catch (CmsVfsResourceNotFoundException e) {
                                LOG.warn(e.getLocalizedMessage(), e);
                            } catch (CmsLockException e) {
                                LOG.warn(e.getLocalizedMessage(), e);
                            }
                        }
                    }
                }
            }
            m_context.finish(changedIds);
        } catch (Exception e) {
            m_context.error(e);
        }
    }
289283
function() {
            var self            = this,
                target          = null,
                el              = null,
                dataset         = null,
                i               = -1;

            self.callActions('beforeIndexTargets', arguments);

            self.dom.targets = self.config.layout.allowNestedTargets ?
                self.dom.container.querySelectorAll(self.config.selectors.target) :
                h.children(self.dom.container, self.config.selectors.target, self.dom.document);

            self.dom.targets = h.arrayFromList(self.dom.targets);

            self.targets = [];

            if ((dataset = self.config.load.dataset) && dataset.length !== self.dom.targets.length) {
                throw new Error(mixitup.messages.errorDatasetPrerenderedMismatch());
            }

            if (self.dom.targets.length) {
                for (i = 0; el = self.dom.targets[i]; i++) {
                    target = new mixitup.Target();

                    target.init(el, self, dataset ? dataset[i] : void(0));

                    target.isInDom = true;

                    self.targets.push(target);
                }

                self.dom.parent = self.dom.targets[0].parentElement === self.dom.container ?
                    self.dom.container :
                    self.dom.targets[0].parentElement;
            }

            self.origOrder = self.targets;

            self.callActions('afterIndexTargets', arguments);
        }
110711
@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        lblMappingID = new javax.swing.JLabel();
        pnlTestButton = new javax.swing.JPanel();
        cmdTestQuery = new javax.swing.JButton();
        lblTestQuery = new javax.swing.JLabel();
        pnlCommandButton = new javax.swing.JPanel();
        cmdInsertMapping = new javax.swing.JButton();
        cmdCancel = new javax.swing.JButton();
        txtMappingID = new javax.swing.JTextField();
        splitTargetSource = new javax.swing.JSplitPane();
        pnlTargetQueryEditor = new javax.swing.JPanel();
        lblTargetQuery = new javax.swing.JLabel();
        scrTargetQuery = new javax.swing.JScrollPane();
        txtTargetQuery = new javax.swing.JTextPane();
        splitSQL = new javax.swing.JSplitPane();
        pnlSourceQueryEditor = new javax.swing.JPanel();
        lblSourceQuery = new javax.swing.JLabel();
        scrSourceQuery = new javax.swing.JScrollPane();
        txtSourceQuery = new javax.swing.JTextPane();
        pnlQueryResult = new javax.swing.JPanel();
        scrQueryResult = new javax.swing.JScrollPane();
        tblQueryResult = new javax.swing.JTable();

        setFocusable(false);
        setMinimumSize(new java.awt.Dimension(600, 500));
        setPreferredSize(new java.awt.Dimension(600, 500));
        setLayout(new java.awt.GridBagLayout());

        lblMappingID.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblMappingID.setText("Mapping ID:");
        lblMappingID.setFocusable(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(8, 10, 8, 0);
        add(lblMappingID, gridBagConstraints);

        cmdTestQuery.setIcon(IconLoader.getImageIcon("images/execute.png"));
        cmdTestQuery.setMnemonic('t');
        cmdTestQuery.setText("Test SQL Query");
        cmdTestQuery.setToolTipText("Execute the SQL query in the SQL query text pane\nand display the first 100 results in the table.");
        cmdTestQuery.setActionCommand("Test SQL query");
        cmdTestQuery.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cmdTestQuery.setContentAreaFilled(false);
        cmdTestQuery.setIconTextGap(5);
        cmdTestQuery.setMaximumSize(new java.awt.Dimension(115, 25));
        cmdTestQuery.setMinimumSize(new java.awt.Dimension(115, 25));
        cmdTestQuery.setPreferredSize(new java.awt.Dimension(115, 25));
        cmdTestQuery.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdTestQueryActionPerformed(evt);
            }
        });
        pnlTestButton.add(cmdTestQuery);

        lblTestQuery.setText("(100 rows)");
        pnlTestButton.add(lblTestQuery);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(4, 10, 0, 0);
        add(pnlTestButton, gridBagConstraints);

        pnlCommandButton.setFocusable(false);
        pnlCommandButton.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        cmdInsertMapping.setIcon(IconLoader.getImageIcon("images/accept.png"));
        cmdInsertMapping.setText("Accept");
        cmdInsertMapping.setToolTipText("This will add/edit the current mapping into the OBDA model");
        cmdInsertMapping.setActionCommand("OK");
        cmdInsertMapping.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cmdInsertMapping.setContentAreaFilled(false);
        cmdInsertMapping.setIconTextGap(5);
        cmdInsertMapping.setPreferredSize(new java.awt.Dimension(90, 25));
        pnlCommandButton.add(cmdInsertMapping);

        cmdCancel.setIcon(IconLoader.getImageIcon("images/cancel.png"));
        cmdCancel.setText("Cancel");
        cmdCancel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cmdCancel.setContentAreaFilled(false);
        cmdCancel.setIconTextGap(5);
        cmdCancel.setPreferredSize(new java.awt.Dimension(90, 25));
        cmdCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdCancelActionPerformed(evt);
            }
        });
        pnlCommandButton.add(cmdCancel);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 4);
        add(pnlCommandButton, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 0, 8, 10);
        add(txtMappingID, gridBagConstraints);

        splitTargetSource.setBorder(null);
        splitTargetSource.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        splitTargetSource.setResizeWeight(0.5);
        splitTargetSource.setDoubleBuffered(true);
        splitTargetSource.setFocusable(false);
        splitTargetSource.setMinimumSize(new java.awt.Dimension(600, 430));
        splitTargetSource.setOneTouchExpandable(true);
        splitTargetSource.setPreferredSize(new java.awt.Dimension(600, 430));

        pnlTargetQueryEditor.setFocusable(false);
        pnlTargetQueryEditor.setMinimumSize(new java.awt.Dimension(600, 180));
        pnlTargetQueryEditor.setPreferredSize(new java.awt.Dimension(600, 180));
        pnlTargetQueryEditor.setLayout(new java.awt.BorderLayout());

        lblTargetQuery.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblTargetQuery.setText("Target (Triples Template):");
        lblTargetQuery.setFocusable(false);
        pnlTargetQueryEditor.add(lblTargetQuery, java.awt.BorderLayout.NORTH);

        scrTargetQuery.setFocusable(false);
        scrTargetQuery.setMinimumSize(new java.awt.Dimension(600, 170));
        scrTargetQuery.setPreferredSize(new java.awt.Dimension(600, 170));

        txtTargetQuery.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 13)); // NOI18N
        txtTargetQuery.setFocusCycleRoot(false);
        txtTargetQuery.setMinimumSize(new java.awt.Dimension(600, 170));
        txtTargetQuery.setPreferredSize(new java.awt.Dimension(600, 170));
        scrTargetQuery.setViewportView(txtTargetQuery);

        pnlTargetQueryEditor.add(scrTargetQuery, java.awt.BorderLayout.CENTER);

        splitTargetSource.setLeftComponent(pnlTargetQueryEditor);

        splitSQL.setBorder(null);
        splitSQL.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        splitSQL.setResizeWeight(0.8);
        splitSQL.setFocusable(false);
        splitSQL.setMinimumSize(new java.awt.Dimension(600, 280));
        splitSQL.setOneTouchExpandable(true);
        splitSQL.setPreferredSize(new java.awt.Dimension(600, 280));

        pnlSourceQueryEditor.setFocusable(false);
        pnlSourceQueryEditor.setMinimumSize(new java.awt.Dimension(600, 150));
        pnlSourceQueryEditor.setPreferredSize(new java.awt.Dimension(600, 150));
        pnlSourceQueryEditor.setLayout(new java.awt.BorderLayout());

        lblSourceQuery.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblSourceQuery.setText("Source (SQL Query):");
        lblSourceQuery.setFocusable(false);
        pnlSourceQueryEditor.add(lblSourceQuery, java.awt.BorderLayout.NORTH);

        scrSourceQuery.setFocusable(false);

        txtSourceQuery.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 13)); // NOI18N
        txtSourceQuery.setFocusCycleRoot(false);
        scrSourceQuery.setViewportView(txtSourceQuery);

        pnlSourceQueryEditor.add(scrSourceQuery, java.awt.BorderLayout.CENTER);

        splitSQL.setTopComponent(pnlSourceQueryEditor);

        pnlQueryResult.setFocusable(false);
        pnlQueryResult.setMinimumSize(new java.awt.Dimension(600, 120));
        pnlQueryResult.setPreferredSize(new java.awt.Dimension(600, 120));
        pnlQueryResult.setLayout(new java.awt.BorderLayout());

        scrQueryResult.setFocusable(false);
        scrQueryResult.setPreferredSize(new java.awt.Dimension(454, 70));

        tblQueryResult.setMinimumSize(new java.awt.Dimension(600, 180));
        scrQueryResult.setViewportView(tblQueryResult);

        pnlQueryResult.add(scrQueryResult, java.awt.BorderLayout.CENTER);

        splitSQL.setBottomComponent(pnlQueryResult);

        splitTargetSource.setRightComponent(splitSQL);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
        add(splitTargetSource, gridBagConstraints);

        getAccessibleContext().setAccessibleName("Mapping editor");
    }
446475
private void executeDropIndex(Tree statement) throws TException, SchemaDisagreementException, InvalidRequestException, NotFoundException
    {
        if (!CliMain.isConnected() || !hasKeySpace())
            return;

        // getColumnFamily will check if CF exists for us
        String columnFamily = CliCompiler.getColumnFamily(statement, currentCfDefs());
        String rawColumName = CliUtils.unescapeSQLString(statement.getChild(1).getText());

        CfDef cfDef = getCfDef(columnFamily);

        ByteBuffer columnName = columnNameAsBytes(rawColumName, cfDef);

        boolean foundColumn = false;

        for (ColumnDef column : cfDef.getColumn_metadata())
        {
            if (column.name.equals(columnName))
            {
                foundColumn = true;

                if (column.getIndex_type() == null)
                    throw new RuntimeException(String.format("Column '%s' does not have an index.", rawColumName));

                column.setIndex_name(null);
                column.setIndex_type(null);
            }
        }

        if (!foundColumn)
            throw new RuntimeException(String.format("Column '%s' definition was not found in ColumnFamily '%s'.",
                                                     rawColumName,
                                                     columnFamily));

        String mySchemaVersion = thriftClient.system_update_column_family(cfDef);
        sessionState.out.println(mySchemaVersion);
        keyspacesMap.put(keySpace, thriftClient.describe_keyspace(keySpace));
    }
556524
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();
        ServletResponse res = pageContext.getResponse();

        if (CmsFlexController.isCmsRequest(req)) {
            // this will always be true if the page is called through OpenCms
            CmsObject cms = CmsFlexController.getCmsObject(req);
            String target = null;

            // try to find out what to do
            if (m_target != null) {
                // option 1: target is set with "page" or "file" parameter
                target = m_target + getSuffix();
            } else if (m_property != null) {
                // option 2: target is set with "property" parameter
                try {
                    String prop = cms.readPropertyObject(cms.getRequestContext().getUri(), m_property, true).getValue();
                    if (prop != null) {
                        target = prop + getSuffix();
                    }
                } catch (RuntimeException e) {
                    // target must be null
                    target = null;
                } catch (Exception e) {
                    // target will be null
                    e = null;
                }
            } else if (m_attribute != null) {
                // option 3: target is set in "attribute" parameter
                try {
                    String attr = (String)req.getAttribute(m_attribute);
                    if (attr != null) {
                        target = attr + getSuffix();
                    }
                } catch (RuntimeException e) {
                    // target must be null
                    target = null;
                } catch (Exception e) {
                    // target will be null
                    e = null;
                }
            } else {
                // option 4: target might be set in body
                String body = null;
                if (getBodyContent() != null) {
                    body = getBodyContent().getString();
                    if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(body)) {
                        // target IS set in body
                        target = body + getSuffix();
                    }
                    // else target is not set at all, default will be used
                }
            }

            // now perform the include action
            includeTagAction(
                pageContext,
                target,
                m_element,
                null,
                m_editable,
                m_cacheable,
                m_parameterMap,
                CmsRequestUtil.getAtrributeMap(req),
                req,
                res);

            release();
        }

        return EVAL_PAGE;
    }
795193
@Override
	public void actionPerformed(ActionEvent event) {

		Object mysource = event.getSource();

		if ( ! (mysource instanceof JComboBox )) {
			super.actionPerformed(event);
			return;
		}

		@SuppressWarnings("unchecked")
		JComboBox<String> source = (JComboBox<String>) event.getSource();
		String value = source.getSelectedItem().toString();
		evalString("save selection; ");

		String selectLigand = "select ligand;wireframe 0.16;spacefill 0.5; color cpk ;";

		if ( value.equals("Cartoon")){
			String script = "hide null; select all;  spacefill off; wireframe off; backbone off;" +
					" cartoon on; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("Backbone")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone 0.4;" +
					" cartoon off; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("CPK")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone off;" +
					" cartoon off; cpk on;" +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);

		} else if (value.equals("Ligands")){
			this.executeCmd("restrict ligand; cartoon off; wireframe on;  display selected;");
		} else if (value.equals("Ligands and Pocket")){
			this.executeCmd(" select within (6.0,ligand); cartoon off; wireframe on; backbone off; display selected; ");
		} else if ( value.equals("Ball and Stick")){
			String script = "hide null; restrict not water;  wireframe 0.2; spacefill 25%;" +
					" cartoon off; backbone off; " +
					" select ligand; wireframe 0.16; spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if ( value.equals("By Chain")){
			jmolColorByChain();
			String script = "hide null; select all;set defaultColors Jmol; color_by_chain(\"cartoon\"); color_by_chain(\"\"); " + selectLigand + "; select all; ";
			this.executeCmd(script);
		} else if ( value.equals("Rainbow")) {
			this.executeCmd("hide null; select all; set defaultColors Jmol; color group; color cartoon group; " + selectLigand + "; select all; " );
		} else if ( value.equals("Secondary Structure")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color structure; color cartoon structure;" + selectLigand + "; select all; " );

		} else if ( value.equals("By Element")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color cpk; color cartoon cpk; " + selectLigand + "; select all; ");
		} else if ( value.equals("By Amino Acid")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color amino; color cartoon amino; " + selectLigand + "; select all; " );
		} else if ( value.equals("Hydrophobicity") ){
			this.executeCmd("hide null; set defaultColors Jmol; select hydrophobic; color red; color cartoon red; select not hydrophobic ; color blue ; color cartoon blue; "+ selectLigand+"; select all; ");
		} else if ( value.equals("Suggest Domains")){
			colorByPDP();
		} else if ( value.equals("Show SCOP Domains")){
			colorBySCOP();
		}
		evalString("restore selection; ");
	}
1288686
function(session) {
    this.session = session;
    this.doc = session.getDocument();

    this.clearSelection();
    this.selectionLead = this.doc.createAnchor(0, 0);
    this.selectionAnchor = this.doc.createAnchor(0, 0);

    var _self = this;
    this.selectionLead.on("change", function(e) {
        _self._emit("changeCursor");
        if (!_self.$isEmpty)
            _self._emit("changeSelection");
        if (!_self.$preventUpdateDesiredColumnOnChange && e.old.column != e.value.column)
            _self.$updateDesiredColumn();
    });

    this.selectionAnchor.on("change", function() {
        if (!_self.$isEmpty)
            _self._emit("changeSelection");
    });
}
382376
@Override
    public final void execute() {
        beforeLine = editor.getLine();
        beforeColumn = editor.getColumn();
        doExecute();
        afterLine = editor.getLine();
        afterColumn = editor.getColumn();
    }
377447
@Override
  public void service(RequestWeb req)
  {
    init();
    
    String pathInfo = req.pathInfo();
    
    if (pathInfo.isEmpty() || pathInfo.equals("/")) {
      pathInfo = _config.get("server.index", "index.html");
    } else {
      pathInfo = pathInfo.substring(1);
    }

    Path path = _root.resolve(pathInfo);
    //PathImpl path = Vfs.lookup(root).lookup("./" + pathInfo);
    
    if (Files.isDirectory(path)) {
      path = path.resolve(_config.get("server.index", "index.html"));
    }
    
    long len;
    
    try {
      len = Files.size(path);
    } catch (IOException e) {
      
      req.fail(new FileNotFoundException("file not found: " + req.uri()));
      return;
    }
    
    try (InputStream is = Files.newInputStream(path)) {
      if (is == null) {
        req.fail(new FileNotFoundException(pathInfo));
        return;
      }

      String mimeType = mimeType(pathInfo);
      
      if (mimeType != null) {
        req.header("content-type", mimeType);
      }
      else {
        req.header("content-type", "text/plain; charset=utf-8");
      }
      
      // XXX:
      if (len > 0) {
        req.length(len);
      }
      
      TempBuffer tBuf = TempBuffer.create();
      byte []buffer = tBuf.buffer();
      
      int sublen;
      
      while ((sublen = is.read(buffer, 0, buffer.length)) > 0) {
        req.write(buffer, 0, sublen);
      }
      
      tBuf.free();
    } catch (IOException e) {
      req.fail(e);
    }
    
    req.ok();
  }
778212
@Override
    protected void configureFindbugsEngine() {
        if (not != null) {
            addArg("-not");
        }
        addBoolOption("-notAProblem", notAProblem);
        addBoolOption("-withSource", withSource);
        addOption("-exclude", exclude);
        addOption("-include", include);
        addOption("-annotation", annotation);
        addOption("-after", after);
        addOption("-before", before);
        addOption("-first", first);
        addOption("-last", last);
        addOption("-fixed", fixed);
        addOption("-present", present);
        addOption("-absent", absent);
        addBoolOption("-active", active);
        addBoolOption("-introducedByChange", introducedByChange);
        addBoolOption("-removedByChange", removedByChange);
        addBoolOption("-newCode", newCode);
        addBoolOption("-removedCode", removedCode);
        addOption("-priority", priority);
        addOption("-maxRank", maxRank);
        addOption("-class", clazz);
        addOption("-bugPattern", bugPattern);
        addOption("-category", category);
        addOption("-designation", designation);
        addBoolOption("-withMessages", withMessages);
        addBoolOption("-applySuppression", applySuppression);
        if (excludeBugs != null) {
            addArg("-excludeBugs");
            addArg(excludeBugs);
        }

        addArg(inputFile.getName());

        addArg(outputFile.getPath());
    }
1127217
@Override
    public void actionCommit() {

        List<Throwable> errors = new ArrayList<Throwable>();

        try {
            // if new create it first
            if (m_group.getId() == null) {
                CmsGroup newGroup = getCms().createGroup(
                    m_paramOufqn + m_group.getSimpleName(),
                    m_group.getDescription(),
                    m_group.isEnabled() ? I_CmsPrincipal.FLAG_ENABLED : I_CmsPrincipal.FLAG_DISABLED,
                    getParentGroup());
                m_group = newGroup;
            } else {
                if (getParentGroup() != null) {
                    m_group.setParentId(getCms().readGroup(getParentGroup()).getId());
                } else {
                    m_group.setParentId(CmsUUID.getNullUUID());
                }
            }
            // write the edited group
            getCms().writeGroup(m_group);
            // refresh the list
            Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject();
            if (objects != null) {
                objects.remove(getListClass());
                objects.remove(A_CmsUsersList.class.getName());
            }
        } catch (Throwable t) {
            errors.add(t);
        }

        if (errors.isEmpty() && isNewGroup()) {
            if ((getParamCloseLink() != null) && (getParamCloseLink().indexOf("path=" + getListRootPath()) > -1)) {
                // set closelink
                Map<String, String[]> argMap = new HashMap<String, String[]>();
                argMap.put("groupid", new String[] {m_group.getId().toString()});
                argMap.put("groupname", new String[] {m_group.getName()});
                argMap.put("oufqn", new String[] {m_paramOufqn});
                setParamCloseLink(CmsToolManager.linkForToolPath(getJsp(), getListRootPath() + "/edit", argMap));
            }
        }
        // set the list of errors to display when saving failed
        setCommitErrors(errors);
    }