本文整理汇总了Java中org.eclipse.jface.dialogs.PageChangedEvent.getSelectedPage方法的典型用法代码示例。如果您正苦于以下问题:Java PageChangedEvent.getSelectedPage方法的具体用法?Java PageChangedEvent.getSelectedPage怎么用?Java PageChangedEvent.getSelectedPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.dialogs.PageChangedEvent
的用法示例。
在下文中一共展示了PageChangedEvent.getSelectedPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
Object selectedPage = event.getSelectedPage();
vpmAnalysisWizard.updateConfiguration();
if (selectedPage instanceof VPMAnalyzerConfigurationPage) {
VPMAnalyzerConfigurationPage configPage = (VPMAnalyzerConfigurationPage) selectedPage;
analyzers = configPage.getAnalyzers();
} else if (selectedPage instanceof ResultHandlingConfigurationPage) {
ResultHandlingConfigurationPage resultPage = (ResultHandlingConfigurationPage) selectedPage;
if (analyzers != null) {
resultPage.setSelectedAnalyzers(analyzers);
}
}
}
示例2: openDialogBox
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow)
{
this.setInjectModel((InjectModel) this.getValue());
CreateInjectWizard wizard = new CreateInjectWizard(this);
final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
if (getInjectModel() != null) {
final IPageChangedListener pageChangedListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event)
{
if (event.getSelectedPage() instanceof CreateCTablePage) {
((CreateCTablePage) dialog.getCurrentPage())
.setData((InjectModel) getInjectModel());
dialog.removePageChangedListener(this);
}
}
};
dialog.addPageChangedListener(pageChangedListener);
}
dialog.open();
return this.getInjectModel();
}
示例3: openDialogBox
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
protected Object openDialogBox(Control cellEditorWindow)
{
this.setSqlAreaModel((TableSqlAreaModel) this.getValue());
CreateTableSqlWizard wizard = new CreateTableSqlWizard(this);
final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
if (getSqlAreaModel() != null) {
final IPageChangedListener pageChangedListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event)
{
if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
((CreateTableSqlPageOne) dialog.getCurrentPage())
.setData((TableSqlAreaModel) getSqlAreaModel());
dialog.removePageChangedListener(this);
}
}
};
dialog.addPageChangedListener(pageChangedListener);
}
dialog.open();
return this.getSqlAreaModel();
}
示例4: openDialogBox
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow)
{
this.setSqlSet((SqlSet) this.getValue());
CreateChartSqlWizard wizard = new CreateChartSqlWizard(this);
final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
if (getSqlSet() != null) {
final IPageChangedListener pageChangedListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event)
{
if (event.getSelectedPage() instanceof CreateSelectChartPage) {
((CreateSelectChartPage) dialog.getCurrentPage()).setData(getSqlSet());
dialog.removePageChangedListener(this);
}
}
};
dialog.addPageChangedListener(pageChangedListener);
}
dialog.open();
return this.getSqlSet();
}
示例5: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
Object selectedPage = event.getSelectedPage();
if (seenPages.contains(selectedPage))
return;
seenPages.add(selectedPage);
if (selectedPage instanceof AbstractTextEditor) {
IEditorPart editorPart = (IEditorPart) selectedPage;
IProject project = plugin.getProjectForEditor(editorPart.getEditorInput());
if (plugin.getIgnoreProjectsList().contains(project.getName()))
return;
ISourceViewer sourceViewer = (ISourceViewer) editorPart.getAdapter(ITextOperationTarget.class);
sourceViewer.getDocument().addDocumentListener(new DocumentListener());
}
}
开发者ID:ChangeOrientedProgrammingEnvironment,项目名称:eclipseRecorder,代码行数:17,代码来源:MultiEditorPageChangedListener.java
示例6: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected void pageChanged(PageChangedEvent event) {
Object page = event.getSelectedPage();
if (page instanceof IWorkbenchPart) {
setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
}
}
示例7: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected void pageChanged(PageChangedEvent event) {
Object selectedPage = event.getSelectedPage();
if (selectedPage instanceof IWorkbenchPart) {
setBaseEnabled(isDecorable((IWorkbenchPart) selectedPage));
}
}
示例8: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
Object page = event.getSelectedPage();
if (page instanceof IWorkbenchPart) {
updateHandler((IWorkbenchPart) page);
}
}
示例9: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
Object page = event.getSelectedPage();
if (page instanceof IWorkbenchPart) {
Object adapter = ((WorkbenchPart) page).getAdapter(MergeRowHighlightDecorator.class);
MergeRowHighlightDecorator decorator = (MergeRowHighlightDecorator) adapter;
updateState(decorator);
}
}
示例10: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
/**
* Called whenever the wizard page has changed and forces its container
* to resize its content.
*
* @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
*/
public void pageChanged( PageChangedEvent event )
{
if ( this.wizardPage == event.getSelectedPage( ) )
{
// force size update
IWizardContainer container = getContainer( );
if ( container instanceof IWizardContainer2 )
{
( (IWizardContainer2) container ).updateSize( );
}
}
}
示例11: performRequest
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void performRequest(Request request)
{
if (request.getType().equals(RequestConstants.REQ_OPEN)) {
SqlSet sqlSet = new SqlSet();
CreateChartSqlWizard wizard = new CreateChartSqlWizard(sqlSet);
final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
if (((ChartBlockModel) this.getModel()).getSqlSet() != null) {
final IPageChangedListener pageChangedListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event)
{
if (event.getSelectedPage() instanceof CreateSelectChartPage) {
((CreateSelectChartPage) dialog.getCurrentPage())
.setData(((ChartBlockModel) getModel()).getSqlSet());
dialog.removePageChangedListener(this);
}
}
};
dialog.addPageChangedListener(pageChangedListener);
}
dialog.open();
if (sqlSet.getChartType() != null && sqlSet.getSqls() != null) {
((ChartBlockModel) getModel()).setSqlSet(sqlSet);
((ChartBlockModel) getModel()).setChartType(sqlSet.getChartType().getName());
((ChartBlockModel) getModel()).setChartTypeDisplayName(sqlSet.getChartType()
.getDisplayName());
((ChartBlockModel) getModel()).setBlockName(sqlSet.getName());
this.getRoot().getViewer().getEditDomain().getCommandStack().execute(new Command() {
});
}
}
}
示例12: init
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void init(IWorkbench targetWorkbench, IStructuredSelection currentSelection) {
// this.selection = currentSelection;
List<?> selectedResources = IDE.computeSelectedResources(currentSelection);
List<IProject> workspaceProjects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());
// Find all selected projects
Set<IProject> projects = selectedResources.stream()
.filter(m -> m instanceof IResource)
.map(m -> ((IResource) m).getProject())
.filter(p -> p.isOpen()) // only open projects
.collect(Collectors.toSet());
// make the behavior predictable by ordering:
TreeSet<IProject> sortedProjects = Sets
.<IProject> newTreeSet((a, b) -> a.getName()
.compareToIgnoreCase(b.getName()));
sortedProjects.addAll(projects);
// 0) turn into IN4JSProject and give and process further.
// a) find out which projects fulfill the npm-"exportable"-contract
// b) give back a list to the user what to export,
// c) disable things not fullfilling the contract.
// d) take choosing from the list and pass to exporter in non-ui package.
// 0)
List<IN4JSEclipseProject> rawN4jsProjects = Lists.newArrayList();
iP2in4jsP = HashBiMap.create();
for (IProject iProject : workspaceProjects) {
IN4JSEclipseProject mappedIn4jsProject = map2In4js(iProject);
if (mappedIn4jsProject != null) {
rawN4jsProjects.add(mappedIn4jsProject);
iP2in4jsP.put(iProject, mappedIn4jsProject);
}
}
// filter out Non-N4JS-projects from initial selection.
sortedProjects.retainAll(iP2in4jsP.keySet());
// filter out all non-N4JS-projects from the workspace projects.
ArrayList<IProject> filteredWorkspaceProjects = new ArrayList<>(workspaceProjects);
filteredWorkspaceProjects.retainAll(iP2in4jsP.keySet());
setWindowTitle("N4JS to npm Export");
setNeedsProgressMonitor(true);
Map<IProject, Boolean> selectedProjects = new HashMap<>();
// Add all workspace projects to list, default selection value is false
filteredWorkspaceProjects.forEach(project -> selectedProjects.put(project, false));
// Override selection value for all initially selected projects
sortedProjects.forEach(project -> selectedProjects.put(project, true));
// exportPage = new ExportSelectionPage("Export Page", rawN4jsProjects, labelProvider);
exportPage = new ExportSelectionPage("Export Page", selectedProjects);
if (runTools())
toolRunnerPage = new NpmToolRunnerPage("npm Execution Page");
comparePage = new PackageJsonComparePage("Compare package.json Page");
pageListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event) {
if (event.getSelectedPage() == comparePage) {
udpatePackagJasonComparison();
}
}
};
}
示例13: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public final void pageChanged(PageChangedEvent event) {
if (event.getSelectedPage() == this) {
pageActivated();
}
}
示例14: pageChanged
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
currentPage = (WizardBasePage) event.getSelectedPage();
}
示例15: performRequest
import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void performRequest(Request request)
{
if (request.getType().equals(RequestConstants.REQ_OPEN)) {
try {
TableSqlAreaModel sqlArea = new TableSqlAreaModel();
CreateTableSqlWizard wizard = new CreateTableSqlWizard(sqlArea);
final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
if (((TableModel) this.getModel()).getSqlAreaModel() != null) {
final IPageChangedListener pageChangedListener = new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event)
{
if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
((CreateTableSqlPageOne) dialog.getCurrentPage())
.setData(((TableModel) getModel()).getSqlAreaModel());
dialog.removePageChangedListener(this);
}
}
};
dialog.addPageChangedListener(pageChangedListener);
}
dialog.open();
if (sqlArea.getSqlName() != null && sqlArea.getSqlArea() != null
&& sqlArea.getCms() != null) {
((TableModel) getModel()).setSqlAreaModel(sqlArea);
((TableModel) getModel()).setSql(sqlArea.getSqlArea());
((TableModel) getModel()).setSqlName(sqlArea.getSqlName());
((TableModel) getModel()).removeAllColumn();
((TableModel) getModel()).addAllColumn(sqlArea.getCms());
((TableModel) getModel()).setBlockName(sqlArea.getSqlName());
this.getRoot().getViewer().getEditDomain().getCommandStack()
.execute(new Command() {
});
}
} catch (Exception e) {
e.printStackTrace();
}
}
}