forked from subgraph/Vega
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support opening multiple request views with unique filters.
- Loading branch information
Cade Cairns
committed
Nov 19, 2011
1 parent
b775b1b
commit d374148
Showing
10 changed files
with
166 additions
and
42 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...orm/com.subgraph.vega.ui.http/src/com/subgraph/vega/ui/http/commands/OpenRequestView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,42 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2011 Subgraph. | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v1.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: | |||
* Subgraph - initial API and implementation | |||
******************************************************************************/ | |||
package com.subgraph.vega.ui.http.commands; | |||
|
|||
import java.util.UUID; | |||
|
|||
import org.eclipse.core.commands.AbstractHandler; | |||
import org.eclipse.core.commands.ExecutionEvent; | |||
import org.eclipse.core.commands.ExecutionException; | |||
import org.eclipse.core.commands.IHandler; | |||
import org.eclipse.swt.widgets.Shell; | |||
import org.eclipse.ui.IWorkbenchPage; | |||
import org.eclipse.ui.PartInitException; | |||
import org.eclipse.ui.handlers.HandlerUtil; | |||
|
|||
import com.subgraph.vega.ui.http.request.view.HttpRequestView; | |||
import com.subgraph.vega.ui.util.dialogs.ErrorDialog; | |||
|
|||
public class OpenRequestView extends AbstractHandler implements IHandler { | |||
|
|||
@Override | |||
public Object execute(ExecutionEvent event) throws ExecutionException { | |||
final String secondaryId = UUID.randomUUID().toString(); | |||
try { | |||
HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(HttpRequestView.ID, secondaryId, IWorkbenchPage.VIEW_ACTIVATE); | |||
} catch (PartInitException e) { | |||
Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell(); | |||
ErrorDialog.displayExceptionError(shell, e); | |||
return null; | |||
} | |||
return null; | |||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.