Skip to content

Commit

Permalink
manual creation of toolwindow content
Browse files Browse the repository at this point in the history
  • Loading branch information
S.Homburg authored and S.Homburg committed Oct 3, 2022
1 parent a967a77 commit 3dff9bf
Show file tree
Hide file tree
Showing 35 changed files with 1,022 additions and 642 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Changelog

## [Unreleased]

### Added

### Changed
Expand All @@ -10,20 +9,22 @@

### Security

## [1.0.1] - 2022-09-25
## [1.0.1] - 2022-10-03

### Added

- ui redesign

### Changed

- ui redesign

### Fixed

### Security

## [1.0.0] - 2022-09-20

### Added

- first release

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ public class QueryTesterConstants {
public static final String DBEAN_NAME = "record";
public static final String DBEAN_PROPERTY_NAME_KEY = "<key>";
public static final String DBEAN_PROPERTY_NAME_LINENO = "<lineno>";
public static final String DBEAN_PROPERTY_PRE_NAME_FOR_SQL_FUNC = "QueryFunction_";
public static final String DBEAN_PROPERTY_PRE_NAME_FOR_NQL_FUNC = "NqlFunction_";
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester;

import com.hsofttec.intellij.querytester.ui.QueryTester;
Expand All @@ -16,7 +40,7 @@ public class QueryTesterToolWindowFactory implements ToolWindowFactory {
* @param toolWindow current tool window
*/
public void createToolWindowContent( @NotNull Project project, @NotNull ToolWindow toolWindow ) {
Content content = ContentFactory.SERVICE.getInstance( ).createContent( new QueryTester( ), "", false );
Content content = ContentFactory.SERVICE.getInstance( ).createContent( new QueryTester( project ), "", false );
toolWindow.getContentManager( ).addContent( content );
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester.events;

public class CheckServerConnectionEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester.events;

public class CheckedServerConnectionEvent {
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester.events;

import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;
import com.hsofttec.intellij.querytester.models.ConnectionSettings;

public class ConnectionAddedEvent {
private final ConnectionSettingsService.ConnectionSettings connectionSettings;
private final ConnectionSettings connectionSettings;

public ConnectionAddedEvent( ConnectionSettingsService.ConnectionSettings connectionSettings ) {
public ConnectionAddedEvent( ConnectionSettings connectionSettings ) {
this.connectionSettings = connectionSettings;
}

public ConnectionSettingsService.ConnectionSettings getData( ) {
public ConnectionSettings getData( ) {
return connectionSettings;
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester.events;

import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;
import com.hsofttec.intellij.querytester.models.ConnectionSettings;

public class ConnectionChangedEvent {
private final ConnectionSettingsService.ConnectionSettings connectionSettings;
private final ConnectionSettings connectionSettings;

public ConnectionChangedEvent( ConnectionSettingsService.ConnectionSettings connectionSettings ) {
public ConnectionChangedEvent( ConnectionSettings connectionSettings ) {
this.connectionSettings = connectionSettings;
}

public ConnectionSettingsService.ConnectionSettings getData( ) {
public ConnectionSettings getData( ) {
return connectionSettings;
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
/*
* The MIT License (MIT)
*
* Copyright © 2022 Sven Homburg, <homburgs@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.hsofttec.intellij.querytester.events;

import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;
import com.hsofttec.intellij.querytester.models.ConnectionSettings;

public class ConnectionRemovedEvent {
private final ConnectionSettingsService.ConnectionSettings connectionSettings;
private final ConnectionSettings connectionSettings;

public ConnectionRemovedEvent( ConnectionSettingsService.ConnectionSettings connectionSettings ) {
public ConnectionRemovedEvent( ConnectionSettings connectionSettings ) {
this.connectionSettings = connectionSettings;
}

public ConnectionSettingsService.ConnectionSettings getData( ) {
public ConnectionSettings getData( ) {
return connectionSettings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@

package com.hsofttec.intellij.querytester.events;

import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;
import com.hsofttec.intellij.querytester.models.ConnectionSettings;

public class ConnectionSelectionChangedEvent {
private final ConnectionSettingsService.ConnectionSettings connectionSettings;
private final ConnectionSettings connectionSettings;

public ConnectionSelectionChangedEvent( ConnectionSettingsService.ConnectionSettings connectionSettings ) {
public ConnectionSelectionChangedEvent( ConnectionSettings connectionSettings ) {
this.connectionSettings = connectionSettings;
}

public ConnectionSettingsService.ConnectionSettings getConnectionSettings( ) {
public ConnectionSettings getConnectionSettings( ) {
return connectionSettings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
package com.hsofttec.intellij.querytester.events;

import com.hsofttec.intellij.querytester.QueryMode;
import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;
import com.hsofttec.intellij.querytester.models.ConnectionSettings;

public class StartQueryExecutionEvent {
private final QueryExecutionParameters parameters;

public StartQueryExecutionEvent( ConnectionSettingsService.ConnectionSettings connectionSettings,
public StartQueryExecutionEvent( ConnectionSettings connectionSettings,
QueryMode queryMode,
String documentAreaName,
String masterdataScope,
Expand All @@ -45,15 +45,15 @@ public QueryExecutionParameters getData( ) {
}

public static class QueryExecutionParameters {
private final ConnectionSettingsService.ConnectionSettings connectionSettings;
private final ConnectionSettings connectionSettings;
private final QueryMode queryMode;
private final String documentAreaName;
private final String masterdataScope;
private final String rootResourceId;
private final String nqlQuery;
private final boolean aggregate;

public QueryExecutionParameters( ConnectionSettingsService.ConnectionSettings connectionSettings,
public QueryExecutionParameters( ConnectionSettings connectionSettings,
QueryMode queryMode,
String documentAreaName,
String masterdataScope,
Expand All @@ -69,7 +69,7 @@ public QueryExecutionParameters( ConnectionSettingsService.ConnectionSettings co
this.aggregate = aggregate;
}

public ConnectionSettingsService.ConnectionSettings getConnectionSettings( ) {
public ConnectionSettings getConnectionSettings( ) {
return connectionSettings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@

package com.hsofttec.intellij.querytester.models;

import com.hsofttec.intellij.querytester.services.ConnectionSettingsService;

import javax.swing.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Vector;

public class ConnectionConfigurationComboBoxModel extends DefaultComboBoxModel<ConnectionSettingsService.ConnectionSettings> {
public ConnectionConfigurationComboBoxModel( ConnectionSettingsService.ConnectionSettings[] items ) {
super( items );
public class ConnectionConfigurationComboBoxModel extends DefaultComboBoxModel<ConnectionSettings> {
public ConnectionConfigurationComboBoxModel( Collection<ConnectionSettings> items ) {
super( new Vector<>( items ) );
}

@Override
public ConnectionSettingsService.ConnectionSettings getSelectedItem( ) {
return ( ConnectionSettingsService.ConnectionSettings ) super.getSelectedItem( );
public ConnectionSettings getSelectedItem( ) {
return ( ConnectionSettings ) super.getSelectedItem( );
}

public List<ConnectionSettingsService.ConnectionSettings> getItems( ) {
public List<ConnectionSettings> getItems( ) {
int size = getSize( );
List<ConnectionSettingsService.ConnectionSettings> list = new ArrayList<>( size );
List<ConnectionSettings> list = new ArrayList<>( size );
for ( int i = 0; i < size; i++ ) {
list.add( getElementAt( i ) );
}
Expand Down
Loading

0 comments on commit 3dff9bf

Please sign in to comment.