/** * Sets the cycling mode to either of <code>CYCLING_ALWAYS</code>, * <code>CYCLING_NEVER</code>, or <code>CYCLING_WHEN_NO_PARENT</code>, * which is the default. * * @param mode the new cycling mode. */ public void setCyclingMode(Object mode) { if (mode != CYCLE_ALWAYS && mode != CYCLE_NEVER && mode != CYCLE_WHEN_NO_PARENT) throw new IllegalArgumentException(); if (mode == CYCLE_ALWAYS || mode == CYCLE_WHEN_NO_PARENT && !fModel.isNested()) fIterator.setCycling(true); else fIterator.setCycling(false); }
/** * Sets the cycling mode to either of <code>CYCLING_ALWAYS</code>, * <code>CYCLING_NEVER</code>, or <code>CYCLING_WHEN_NO_PARENT</code>, * which is the default. * * @param mode the new cycling mode. */ public void setCyclingMode(Object mode) { if (mode != CYCLE_ALWAYS && mode != CYCLE_NEVER && mode != CYCLE_WHEN_NO_PARENT) throw new IllegalArgumentException(); if (mode == CYCLE_ALWAYS || mode == CYCLE_WHEN_NO_PARENT && !fModel.isNested()) fIterator.setCycling(true); else fIterator.setCycling(false); }
/** * This does the actual constructor work. * * @param model the linked mode model * @param targets the non-empty array of targets upon which the linked mode UI * should act */ private void constructor(LinkedModeModel model, LinkedModeUITarget[] targets) { Assert.isNotNull(model); Assert.isNotNull(targets); Assert.isTrue(targets.length > 0); Assert.isTrue(model.getTabStopSequence().size() > 0); fModel= model; fTargets= targets; fCurrentTarget= targets[0]; fIterator= new TabStopIterator(fModel.getTabStopSequence()); fIterator.setCycling(!fModel.isNested()); fModel.addLinkingListener(fLinkedListener); fAssistant= new ContentAssistant2(); fAssistant.addProposalListener(fProposalListener); // TODO find a way to set up content assistant. // fAssistant.setDocumentPartitioning(IJavaPartitions.JAVA_PARTITIONING); fCaretPosition.delete(); }
/** * This does the actual constructor work. * * @param model the linked mode model * @param targets the non-empty array of targets upon which the linked mode UI * should act */ private void constructor(LinkedModeModel model, LinkedModeUITarget[] targets) { Assert.isNotNull(model); Assert.isNotNull(targets); Assert.isTrue(targets.length > 0); Assert.isTrue(model.getTabStopSequence().size() > 0); fModel= model; fTargets= targets; fCurrentTarget= targets[0]; fIterator= new TabStopIterator(fModel.getTabStopSequence()); fIterator.setCycling(!fModel.isNested()); fModel.addLinkingListener(fLinkedListener); fAssistant= new ContentAssistant2(); fAssistant.addProposalListener(fProposalListener); // TODO find a way to set up content assistant. // fAssistant.setDocumentPartitioning(IJavaPartitions.JAVA_PARTITIONING); fCaretPosition.delete(); }