Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Results View Control"

m (New page: ← Back to SQL Development Tools page = Introduction = The DTP Results View now provides a ResultsViewControl component for displaying SQL execution results...)
 
m
Line 6: Line 6:
 
== ResultsViewControl ==
 
== ResultsViewControl ==
 
=== Location ===
 
=== Location ===
The ''ResultsViewControl'' is in the package
+
The <tt>ResultsViewControl</tt> is in the package
:''org.eclipse.datatools.sqltools.result.ui.view''.
+
:<tt>org.eclipse.datatools.sqltools.result.ui.view</tt>.
sqlBuilder = new SQLBuiin the plugin
+
belonging to the plugin
: ''org.eclipse.datatools.sqltools.result''
+
: <tt>org.eclipse.datatools.sqltools.result</tt>
  
 
=== API ===
 
=== API ===
 
The ResultsViewControl should be instantiated using the constructor
 
The ResultsViewControl should be instantiated using the constructor
:ResultsViewControl(ResultsView)
+
:<tt>ResultsViewControl(ResultsView)</tt>
passing ''null'' as the ResultsView parameter.
+
passing <tt>null</tt> as the ResultsView parameter.
  
The caller can request the ResultsViewControl to use the Preferences defined for the SQL Results View or not, using the method
+
After instantiation, the ResultsViewControl should be initialized by calling:
:setUsePreferences(boolean)
+
:<tt>init(IViewSite, IMemento) throws PartInitException</tt>
 +
passing two <tt>null</tt> parameters.
  
If ''setUsePreferences(true)'' is called, the preferences for SQL Results View relating to the user-interface will be used. These control, for example, whether results are shown in a single window or multiple windows, in text mode or grid mode.
+
The final part of ResultsViewControl creation is to call
 +
:<tt>void createPartControl(Composite parent)</tt>
  
If ''setUsePreferences(false)'' is called, the preferences defaults for the SQL Results View are used.
+
The client can request the ResultsViewControl to use the Preferences defined for the SQL Results View or not, using the method
 +
:<tt>setUsePreferences(boolean)</tt>
  
 +
If <tt>setUsePreferences(true)</tt> is called, the preferences for SQL Results View relating to the user-interface will be used. These control, for example, whether results are shown in a single window or multiple windows, in text mode or grid mode.
 +
 +
If <tt>setUsePreferences(false)</tt> is called, the preferences defaults for the SQL Results View are used.
 +
 +
For example code, see [[http://wiki.eclipse.org/index.php?title=Results_View_Control]]
 +
<pre>
 
/*
 
/*
 
* Add the results view
 
* Add the results view
Line 37: Line 46:
 
}
 
}
 
_resultsViewControl.createPartControl(resultsComposite);
 
_resultsViewControl.createPartControl(resultsComposite);
 +
</pre>
  
 
== Filtering Results ==
 
== Filtering Results ==
<br>
 
 
Signature: [[User:Jeremyl.sybase.com|Jeremyl.sybase.com]] 06:26, 17 December 2007 (EST)  
 
Signature: [[User:Jeremyl.sybase.com|Jeremyl.sybase.com]] 06:26, 17 December 2007 (EST)  
</br>
 
 
== Example usage ==
 
== Example usage ==

Revision as of 07:35, 17 December 2007

Back to SQL Development Tools page

Introduction

The DTP Results View now provides a ResultsViewControl component for displaying SQL execution results. The ResultsViewControl can be consumed by other UI components such as editors, dialogs and wizards, enabling them to show SQL execution results in their own user-interface.

ResultsViewControl

Location

The ResultsViewControl is in the package

org.eclipse.datatools.sqltools.result.ui.view.

belonging to the plugin

org.eclipse.datatools.sqltools.result

API

The ResultsViewControl should be instantiated using the constructor

ResultsViewControl(ResultsView)

passing null as the ResultsView parameter.

After instantiation, the ResultsViewControl should be initialized by calling:

init(IViewSite, IMemento) throws PartInitException

passing two null parameters.

The final part of ResultsViewControl creation is to call

void createPartControl(Composite parent)

The client can request the ResultsViewControl to use the Preferences defined for the SQL Results View or not, using the method

setUsePreferences(boolean)

If setUsePreferences(true) is called, the preferences for SQL Results View relating to the user-interface will be used. These control, for example, whether results are shown in a single window or multiple windows, in text mode or grid mode.

If setUsePreferences(false) is called, the preferences defaults for the SQL Results View are used.

For example code, see [[1]]

		/*
		 * Add the results view
		 */
		_resultsViewControl = new ResultsViewControl(null);
		/*
		 * Tell the results view to use preferences
		 */
		_resultsViewControl.setUsePreferences(true);
		try {
			_resultsViewControl.init(null, null);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
		_resultsViewControl.createPartControl(resultsComposite);	

Filtering Results

Signature: Jeremyl.sybase.com 06:26, 17 December 2007 (EST)

Example usage

Back to the top