public HeaderForm(FormEditor editor, ScrolledForm form) { super(editor.getToolkit(), form); setContainer(editor); if (editor.getEditorInput() != null) setInput(editor.getEditorInput()); }
public HeaderForm(FormEditor editor, ScrolledForm form) { super(editor.getToolkit(), form); setContainer(editor); if (editor.getEditorInput() != null) setInput(editor.getEditorInput()); }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); } }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); } }
private void registerPage(int index, Object page) throws PartInitException { if (!pages.contains(page)) { if (index == -1) pages.add(page); else pages.add(index, page); } if (page instanceof IFormPage) { IFormPage fpage = (IFormPage) page; if (fpage.isEditor() == false) fpage.init(getEditorSite(), getEditorInput()); } } }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { AgentMappingInput input = (AgentMappingInput) formPage.getEditor().getEditorInput(); agentMappings = input.getAgentMappings(); } }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); } }
private void registerPage(int index, Object page) throws PartInitException { if (!pages.contains(page)) { if (index == -1) pages.add(page); else pages.add(index, page); } if (page instanceof IFormPage) { IFormPage fpage = (IFormPage) page; if (fpage.isEditor() == false) fpage.init(getEditorSite(), getEditorInput()); } } }
/** * Default constructor. * * @param editor * {@link FormEditor} page belongs to. */ public ApplicationDefinitionPage(FormEditor editor) { super(editor, ID, TITLE); editor.addPropertyListener(this); ApplicationDefinitionEditorInput input = (ApplicationDefinitionEditorInput) getEditor().getEditorInput(); this.application = input.getApplication(); }
@Override public void profileUpdated(Profile profile, CmrRepositoryDefinition repositoryDefinition, boolean onlyProperties) { CmrRepositoryDefinition displayedCmrRepositoryDefinition = ((EnvironmentEditorInput) formPage.getEditor().getEditorInput()).getCmrRepositoryDefinition(); if (!Objects.equals(repositoryDefinition, displayedCmrRepositoryDefinition)) { return; } for (Iterator<Profile> it = profiles.iterator(); it.hasNext();) { Profile displayed = it.next(); if (Objects.equals(displayed.getId(), profile.getId())) { it.remove(); profiles.add(profile); SafeExecutor.asyncExec(new Runnable() { @Override public void run() { tableViewer.refresh(); updateCheckedItems(); } }, tableViewer.getTable()); break; } } }
/** * {@inheritDoc} */ @Override public void profileCreated(Profile profile, CmrRepositoryDefinition repositoryDefinition) { CmrRepositoryDefinition displayedCmrRepositoryDefinition = ((EnvironmentEditorInput) formPage.getEditor().getEditorInput()).getCmrRepositoryDefinition(); if (!Objects.equals(repositoryDefinition, displayedCmrRepositoryDefinition)) { return; } profiles.add(profile); SafeExecutor.asyncExec(new Runnable() { @Override public void run() { tableViewer.refresh(); updateCheckedItems(); } }, tableViewer.getTable()); }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); configurationComponent.updateSensorConfig(environment.getJmxSensorConfig()); } }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); tableViewer.setInput(environment.getPlatformSensorConfigs()); } }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); for (LoggingConfigurationComponent logComponent : logConfigComponents) { for (IMethodSensorConfig methodSensorConfig : environment.getMethodSensorConfigs()) { if (methodSensorConfig instanceof ILoggingSensorConfig) { if (logComponent.updateSensorConfig((ILoggingSensorConfig) methodSensorConfig)) { break; } } } } } }
/** * Constructor. * * @param formPage * The {@link FormPage} to create this master block for. */ public BusinessTransactionMasterBlock(FormPage formPage) { this.formPage = formPage; this.formPage.getEditor().addPropertyListener(this); ApplicationDefinitionEditorInput input = (ApplicationDefinitionEditorInput) formPage.getEditor().getEditorInput(); applicationDefinition = input.getApplication(); validationManager = new BusinessTransactionValidationManager(); }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { ApplicationDefinitionEditorInput input = (ApplicationDefinitionEditorInput) getEditor().getEditorInput(); setInput(input); application = input.getApplication(); if (null != mainForm) { applicationMatchingRulesPart.initContent(application); applicationMatchingRulesPart.setDescriptionText(DESCRIPTION); } } }
/** * Checks that the editor input has profile with the {@link ExcludeRulesProfileData}. If so, * sets the {@link #profile} and {@link #profileData}. */ private void checkAndGetEditorInput() { ProfileEditorInput input = (ProfileEditorInput) formPage.getEditor().getEditorInput(); Assert.isNotNull(input.getProfile()); Assert.isNotNull(input.getProfile().getProfileData()); Assert.isLegal(input.getProfile().getProfileData().isOfType(ExcludeRulesProfileData.class), "Given profile can not be opened with the exclude rules part."); profile = input.getProfile(); profileData = profile.getProfileData().getIfInstance(ExcludeRulesProfileData.class); }
/** * Checks that the editor input has profile with the {@link SensorAssignmentProfileData}. If so, * sets the {@link #profile} and {@link #profileData}. */ private void checkAndGetEditorInput() { ProfileEditorInput input = (ProfileEditorInput) formPage.getEditor().getEditorInput(); Assert.isNotNull(input.getProfile()); Assert.isNotNull(input.getProfile().getProfileData()); Assert.isLegal(input.getProfile().getProfileData().isOfType(SensorAssignmentProfileData.class), "Given profile can not be opened with the exclude rules part."); this.profile = input.getProfile(); this.profileData = profile.getProfileData().getIfInstance(SensorAssignmentProfileData.class); }
/** * Checks that the editor input has profile with the {@link JmxDefinitionProfileData}. If so, * sets the {@link #profile} and {@link #profileData}. */ private void checkAndGetEditorInput() { ProfileEditorInput input = (ProfileEditorInput) formPage.getEditor().getEditorInput(); Assert.isNotNull(input.getProfile()); Assert.isNotNull(input.getProfile().getProfileData()); Assert.isLegal(input.getProfile().getProfileData().isOfType(JmxDefinitionProfileData.class), "Given profile can not be opened with the exclude rules part."); profile = input.getProfile(); profileData = profile.getProfileData().getIfInstance(JmxDefinitionProfileData.class); }
/** * {@inheritDoc} */ @Override public void propertyChanged(Object source, int propId) { if (propId == IEditorPart.PROP_INPUT) { EnvironmentEditorInput input = (EnvironmentEditorInput) formPage.getEditor().getEditorInput(); environment = input.getEnvironment(); for (StringConstraintComponent constraintComponent : constrainComponents) { for (IMethodSensorConfig methodSensorConfig : environment.getMethodSensorConfigs()) { if (methodSensorConfig instanceof StringConstraintSensorConfig) { if (constraintComponent.updateSensorConfig((StringConstraintSensorConfig) methodSensorConfig)) { break; } } } // manually exception sensor constraintComponent.updateSensorConfig((StringConstraintSensorConfig) environment.getExceptionSensorConfig()); } } }