Showing preview only (616K chars total). Download the full file or copy to clipboard to get everything.
Repository: dboissier/nosql4idea
Branch: master
Commit: aded21e65cae
Files: 175
Total size: 554.1 KB
Directory structure:
gitextract_ngp6_0ag/
├── .gitignore
├── CHANGELOG.txt
├── LICENSE.txt
├── README.md
├── fetchIdea.sh
├── nosql4idea.iml.template
├── pom.xml
└── src/
├── main/
│ ├── java/
│ │ └── org/
│ │ └── codinjutsu/
│ │ └── tools/
│ │ └── nosql/
│ │ ├── ConfigurationDialog.java
│ │ ├── DatabaseVendor.java
│ │ ├── DatabaseVendorClientManager.java
│ │ ├── DatabaseVendorUIManager.java
│ │ ├── NoSqlComponent.java
│ │ ├── NoSqlConfigurable.java
│ │ ├── NoSqlConfiguration.java
│ │ ├── NoSqlExplorerPanel.form
│ │ ├── NoSqlExplorerPanel.java
│ │ ├── NoSqlServerTableModel.java
│ │ ├── NoSqlTreeRenderer.java
│ │ ├── NoSqlWindowManager.java
│ │ ├── SelectDatabaseVendorDialog.form
│ │ ├── SelectDatabaseVendorDialog.java
│ │ ├── ServerConfiguration.java
│ │ ├── commons/
│ │ │ ├── DatabaseUI.java
│ │ │ ├── logic/
│ │ │ │ ├── ConfigurationException.java
│ │ │ │ └── DatabaseClient.java
│ │ │ ├── model/
│ │ │ │ ├── AuthenticationSettings.java
│ │ │ │ ├── Database.java
│ │ │ │ └── DatabaseServer.java
│ │ │ ├── style/
│ │ │ │ └── StyleAttributesProvider.java
│ │ │ ├── utils/
│ │ │ │ ├── DateUtils.java
│ │ │ │ ├── GuiUtils.java
│ │ │ │ └── StringUtils.java
│ │ │ └── view/
│ │ │ ├── AuthenticationView.java
│ │ │ ├── ErrorPanel.java
│ │ │ ├── NoSqlResultView.java
│ │ │ ├── NoSqlTreeNode.java
│ │ │ ├── ServerConfigurationPanel.form
│ │ │ ├── ServerConfigurationPanel.java
│ │ │ ├── ServerConfigurationPanelFactory.java
│ │ │ ├── action/
│ │ │ │ ├── ExecuteQuery.java
│ │ │ │ ├── NoSqlDatabaseConsoleAction.java
│ │ │ │ ├── OpenPluginSettingsAction.java
│ │ │ │ ├── RefreshServerAction.java
│ │ │ │ └── ViewCollectionValuesAction.java
│ │ │ ├── console/
│ │ │ │ └── NoSqlConsoleView.java
│ │ │ ├── editor/
│ │ │ │ ├── NoSqlDatabaseDataEditor.java
│ │ │ │ ├── NoSqlDatabaseDataEditorProvider.java
│ │ │ │ ├── NoSqlDatabaseFileSystem.java
│ │ │ │ └── NoSqlDatabaseObjectFile.java
│ │ │ ├── nodedescriptor/
│ │ │ │ └── NodeDescriptor.java
│ │ │ ├── renderer/
│ │ │ │ ├── KeyCellRenderer.java
│ │ │ │ └── ValueCellRenderer.java
│ │ │ └── table/
│ │ │ ├── CellEditor.java
│ │ │ └── DateTimePicker.java
│ │ ├── couchbase/
│ │ │ ├── CouchbaseUI.java
│ │ │ ├── logic/
│ │ │ │ └── CouchbaseClient.java
│ │ │ ├── model/
│ │ │ │ ├── CouchbaseDatabase.java
│ │ │ │ ├── CouchbaseQuery.java
│ │ │ │ └── CouchbaseResult.java
│ │ │ └── view/
│ │ │ ├── CouchbaseAuthenticationPanel.java
│ │ │ ├── CouchbasePanel.form
│ │ │ ├── CouchbasePanel.java
│ │ │ ├── CouchbaseTreeModel.java
│ │ │ ├── couchbaseAuthenticationPanel.form
│ │ │ ├── editor/
│ │ │ │ ├── CouchbaseFakeFileType.java
│ │ │ │ └── CouchbaseObjectFile.java
│ │ │ └── nodedescriptor/
│ │ │ ├── CouchbaseKeyValueDescriptor.java
│ │ │ ├── CouchbaseResultDescriptor.java
│ │ │ └── CouchbaseValueDescriptor.java
│ │ ├── mongo/
│ │ │ ├── MongoUI.java
│ │ │ ├── MongoUtils.java
│ │ │ ├── logic/
│ │ │ │ ├── MongoClient.java
│ │ │ │ ├── MongoClientURIBuilder.java
│ │ │ │ ├── MongoConnectionException.java
│ │ │ │ └── MongoExtraSettings.java
│ │ │ ├── model/
│ │ │ │ ├── JsonDataType.java
│ │ │ │ ├── MongoAggregateOperator.java
│ │ │ │ ├── MongoCollection.java
│ │ │ │ ├── MongoDatabase.java
│ │ │ │ ├── MongoQueryOptions.java
│ │ │ │ ├── MongoResult.java
│ │ │ │ └── OperatorValueConverter.java
│ │ │ ├── runner/
│ │ │ │ ├── MongoCommandLineState.java
│ │ │ │ ├── MongoRunConfiguration.java
│ │ │ │ ├── MongoRunConfigurationEditor.form
│ │ │ │ ├── MongoRunConfigurationEditor.java
│ │ │ │ ├── MongoRunConfigurationType.java
│ │ │ │ └── MongoScriptRunConfigurationProducer.java
│ │ │ └── view/
│ │ │ ├── AbstractAddDialog.java
│ │ │ ├── AddKeyDialog.form
│ │ │ ├── AddKeyDialog.java
│ │ │ ├── AddValueDialog.form
│ │ │ ├── AddValueDialog.java
│ │ │ ├── JsonTreeTableView.java
│ │ │ ├── MongoAuthenticationPanel.form
│ │ │ ├── MongoAuthenticationPanel.java
│ │ │ ├── MongoEditionPanel.form
│ │ │ ├── MongoEditionPanel.java
│ │ │ ├── MongoPanel.form
│ │ │ ├── MongoPanel.java
│ │ │ ├── MongoResultPanel.form
│ │ │ ├── MongoResultPanel.java
│ │ │ ├── QueryPanel.form
│ │ │ ├── QueryPanel.java
│ │ │ ├── action/
│ │ │ │ ├── AddMongoDocumentAction.java
│ │ │ │ ├── CloseFindEditorAction.java
│ │ │ │ ├── CopyResultAction.java
│ │ │ │ ├── DropCollectionAction.java
│ │ │ │ ├── DropDatabaseAction.java
│ │ │ │ ├── EditMongoDocumentAction.java
│ │ │ │ ├── EnableAggregateAction.java
│ │ │ │ ├── OpenFindAction.java
│ │ │ │ ├── OperatorCompletionAction.java
│ │ │ │ └── edition/
│ │ │ │ ├── AddKeyAction.java
│ │ │ │ ├── AddValueAction.java
│ │ │ │ └── DeleteKeyAction.java
│ │ │ ├── console/
│ │ │ │ └── MongoConsoleRunner.java
│ │ │ ├── editor/
│ │ │ │ ├── MongoFakeFileType.java
│ │ │ │ └── MongoObjectFile.java
│ │ │ ├── model/
│ │ │ │ └── JsonTreeModel.java
│ │ │ ├── nodedescriptor/
│ │ │ │ ├── MongoKeyValueDescriptor.java
│ │ │ │ ├── MongoResultDescriptor.java
│ │ │ │ └── MongoValueDescriptor.java
│ │ │ └── table/
│ │ │ └── MongoDatePickerCellEditor.java
│ │ └── redis/
│ │ ├── RedisUI.java
│ │ ├── RedisUtils.java
│ │ ├── logic/
│ │ │ └── RedisClient.java
│ │ ├── model/
│ │ │ ├── RedisDatabase.java
│ │ │ ├── RedisKeyType.java
│ │ │ ├── RedisQuery.java
│ │ │ ├── RedisRecord.java
│ │ │ └── RedisResult.java
│ │ └── view/
│ │ ├── RedisAuthenticationPanel.form
│ │ ├── RedisAuthenticationPanel.java
│ │ ├── RedisFragmentedKeyTreeModel.java
│ │ ├── RedisPanel.form
│ │ ├── RedisPanel.java
│ │ ├── RedisTreeModel.java
│ │ ├── action/
│ │ │ ├── EnableGroupingAction.java
│ │ │ └── SetSeparatorAction.java
│ │ ├── console/
│ │ │ └── RedisConsoleRunner.java
│ │ ├── editor/
│ │ │ ├── RedisFakeFileType.java
│ │ │ └── RedisObjectFile.java
│ │ └── nodedescriptor/
│ │ ├── FragmentedKeyNodeDescriptor.java
│ │ ├── RedisKeyValueDescriptor.java
│ │ ├── RedisResultDescriptor.java
│ │ └── RedisValueDescriptor.java
│ └── resources/
│ ├── META-INF/
│ │ └── plugin.xml
│ └── assemblies/
│ └── plugin-assembly.xml
└── test/
├── java/
│ └── org/
│ └── codinjutsu/
│ └── tools/
│ └── nosql/
│ ├── commons/
│ │ ├── utils/
│ │ │ ├── DateUtilsTest.java
│ │ │ └── StringUtilsTest.java
│ │ └── view/
│ │ └── TableCellReader.java
│ ├── couchbase/
│ │ ├── CouchbaseClientTest.java
│ │ └── view/
│ │ ├── CouchbasePanelTest.java
│ │ └── ServerConfigurationPanelTest.java
│ ├── mongo/
│ │ ├── logic/
│ │ │ ├── MongoClientTest.java
│ │ │ └── MongoClientURIBuilderTest.java
│ │ └── view/
│ │ ├── MongoEditionPanelTest.java
│ │ ├── MongoResultPanelTest.java
│ │ ├── ServerConfigurationPanelTest.java
│ │ └── model/
│ │ └── JsonTreeModelTest.java
│ └── redis/
│ ├── logic/
│ │ └── RedisClientTest.java
│ └── view/
│ ├── RedisPanelTest.java
│ └── ServerConfigurationPanelTest.java
└── resources/
└── org/
└── codinjutsu/
└── tools/
└── nosql/
└── mongo/
├── logic/
│ └── dummyCollection.json
└── view/
├── arrayOfDocuments.json
├── model/
│ ├── arrayOfDocuments.json
│ ├── simpleDocument.json
│ ├── simpleDocumentWithInnerNodes.json
│ └── simpleDocumentWithSubList.json
├── simpleArray.json
├── simpleDocument.json
├── simpleDocumentForEdition.json
├── simpleDocumentWithSubList.json
└── structuredDocument.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.iml
*.ipr
*.iws
target/
================================================
FILE: CHANGELOG.txt
================================================
0.1.0 - Initial version
* RedisDB: view database content with filter (KEYS instruction is temporary used) and group with separator pattern
* Couchbase: view bucket content with row limit options
* MongoDB: all features from the mongo4idea-0.7.3 ;)
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# NoSql Plugin for IntelliJ IDEA version 0.1.0-SNAPSHOT
## Description
This plugin is a fork from [mongo4idea](https://github.com/dboissier/mongo4idea) and intends to integrate Redis and Couchbase databases. Please note that the Couchbase integration is experimental because I am not a strong user of this database.
## Current status: EAP
* [Download the current SNAPSHOT for Idea 14](https://github.com/dboissier/nosql4idea/raw/master/snapshot/nosql4idea-0.1.0-SNAPSHOT-distribution.zip)
* [Download the current SNAPSHOT for Idea 15](https://github.com/dboissier/nosql4idea/raw/master/snapshot/nosql4idea-0.1.0-SNAPSHOT-Idea15-distribution.zip)
## Plugin Compatibility
This plugin is built with JDK 1.7 and idea 14.1 version.
The plugin has been tested with the following databases:
* MongoDB 2.7 and 3.0
* Redis 2.8.21
* Couchbase Community 4.0.0
## Installation
To install it : `Settings > Plugins > Install plugin from Disk`
## Configuration
On the right, you will see a new tool window named NoSql Explorer

* Click on the Wrench Icon from the toolbar and you will be redirected to the Plugin Settings.
* You can specify the mongo and redis CLI paths at the top of the panel
* To add a server, click on the **\[+\]** button and choose you database vendor

* Click on the **OK** button and enter the settings of your database

* When all your dabatase are configured you should see then in the explorer panel

## Viewing the Redis database content
Double click on the database icon from your redis server and the results will appear as a tab

You can filter the results (Currently, it runs a `KEYS <filter>` command. A `SCAN <filter>` will replace it in the future for optimization purpose.)
Like the **Properties editor**, you can group your data by prefix. Click on the corresponding icon and then click on the Elipsis icon to set you separator

## Viewing the Couchbase database content
Double click on the database icon from your couchbase server and the results will appear as a tab

**Important note**
To get the results from each bucket, an **Index** must be created. Otherwise an error message is raised.
## Roadmap
### 0.1.0
* integrate Redis : view results with 'Group by prefix' feature like **properties editor**
* integrate Couchbase : view results
### 0.2.0
* delete, update and add features for Redis and Couchbase
================================================
FILE: fetchIdea.sh
================================================
#!/usr/bin/env bash
# original file from https://github.com/go-lang-plugin-org/go-lang-idea-plugin
# thanks zolotov :)
ideaVersion='14.1.5'
ideaVersionForMaven='14.1'
#ideaVersion='15.0'
#ideaVersionForMaven='15.0'
rm -rf ./idea-IC
# Get our IDEA dependency
wget http://download.jetbrains.com/idea/ideaIC-${ideaVersion}.tar.gz
# Unzip IDEA
tar -xzf ideaIC-${ideaVersion}.tar.gz
rm -rf ideaIC-${ideaVersion}.tar.gz
# Move the versioned IDEA folder to a known location
ideaPath=$(find . -name 'idea-IC*' | head -n 1)
echo 'Found Intellij path:' + ${ideaPath}
mv ${ideaPath} ./idea-IC
cd ./idea-IC
# install IDEA dependencies
IDEA_HOME=$(pwd)
libs=( 'forms_rt' 'openapi' 'util' 'idea' 'resources' 'resources_en' 'swingx-core-1.6.2' 'annotations' 'extensions' 'jna' 'jdom' 'icons')
for lib in "${libs[@]}"
do
mvn install:install-file -Dfile=${IDEA_HOME}/lib/${lib}.jar -DgroupId=com.intellij -DartifactId=${lib} -Dversion=${ideaVersionForMaven} -Dpackaging=jar
done
================================================
FILE: nosql4idea.iml.template
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="PLUGIN_MODULE" version="4">
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/src/main/resources/META-INF/plugin.xml" />
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mongodb/mongo-java-driver/3.0.4/mongo-java-driver-3.0.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/redis/clients/jedis/2.7.3/jedis-2.7.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/couchbase/client/java-client/2.2.1/java-client-2.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/couchbase/client/core-io/1.2.1/core-io-1.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/io/reactivex/rxjava/1.0.14/rxjava-1.0.14.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/1.4/commons-io-1.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mockito/mockito-all/1.8.5/mockito-all-1.8.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/easytesting/fest-swing/1.2/fest-swing-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/easytesting/fest-assert/1.2/fest-assert-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/easytesting/fest-util/1.1.3/fest-util-1.1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/easytesting/fest-reflect/1.2/fest-reflect-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
================================================
FILE: pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codinjutsu.tools.nosql</groupId>
<artifactId>nosql4idea</artifactId>
<version>0.1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<intellij.sdk.name>141.2735.5</intellij.sdk.name>
<intellij.sdk.version>14.1</intellij.sdk.version>
<!--<intellij.sdk.name>143.381.42</intellij.sdk.name>-->
<!--<intellij.sdk.version>15.0</intellij.sdk.version>-->
<intellij.lib.path>${env.IDEA_HOME}/lib</intellij.lib.path>
</properties>
<packaging>jar</packaging>
<!--
| Project Information
-->
<name>NoSQL Idea Plugin</name>
<description>NoSQL databases integration for Intellij</description>
<inceptionYear>2015</inceptionYear>
<developers>
<developer>
<name>David Boissier</name>
<email>david [dot] boissier [at] gmail [dot] com</email>
<organization>Codinjutsu</organization>
<timezone>+1</timezone>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>forms_rt</artifactId>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>openapi</artifactId>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>util</artifactId>
<version>${intellij.sdk.version}</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-swing</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-util</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<!-- IntelliJ SDK dependencies -->
<dependency>
<groupId>com.intellij</groupId>
<artifactId>idea</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/idea.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>extensions</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/extensions.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>icons</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/icons.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>trove4j</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/trove4j.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>annotations</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/annotations.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>jdom</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/jdom.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>swingx-core</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/swingx-core-1.6.2.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>jna</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/jna.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>resources</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/resources.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>resources_en</artifactId>
<scope>system</scope>
<systemPath>${intellij.lib.path}/resources_en.jar</systemPath>
<version>${intellij.sdk.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>ideauidesigner-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>javac2</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
<debug>false</debug>
<verbose>true</verbose>
<failOnError>true</failOnError>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<descriptors>
<descriptor>src/main/resources/assemblies/plugin-assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
<!--
{ License Information
-->
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<!--
| SCM Information
-->
<scm>
<connection>scm:git:ssh://git@github.com/dboissier/nosql4idea.git</connection>
<url>git:ssh://git@github.com/dboissier/nosql4idea.git</url>
</scm>
</project>
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/ConfigurationDialog.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.ValidationInfo;
import org.codinjutsu.tools.nosql.commons.view.ServerConfigurationPanel;
import org.codinjutsu.tools.nosql.commons.view.ServerConfigurationPanelFactory;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
class ConfigurationDialog extends DialogWrapper {
private final ServerConfigurationPanelFactory serverConfigurationPanelFactory;
private final ServerConfiguration configuration;
private ServerConfigurationPanel serverConfigurationPanel;
ConfigurationDialog(Component parent,
ServerConfigurationPanelFactory serverConfigurationPanelFactory,
ServerConfiguration configuration) {
super(parent, true);
this.serverConfigurationPanelFactory = serverConfigurationPanelFactory;
this.configuration = configuration;
init();
}
@Nullable
@Override
protected JComponent createCenterPanel() {
serverConfigurationPanel = this.serverConfigurationPanelFactory.create(configuration.getDatabaseVendor());
serverConfigurationPanel.loadConfigurationData(configuration);
return serverConfigurationPanel;
}
@Nullable
@Override
protected ValidationInfo doValidate() {
return serverConfigurationPanel.validateInputs();
}
@Override
protected void doOKAction() {
super.doOKAction();
serverConfigurationPanel.applyConfigurationData(configuration);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendor.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import javax.swing.*;
public enum DatabaseVendor {
MONGO("MongoDB", "mongodb.png", "localhost:27017", "format: host:port. If replicat set: host:port1,host:port2,..."),
REDIS("RedisDB", "redis.png", "localhost:6379", "format: host:port. If cluster: host:port1,host:port2,..."),
COUCHBASE("Couchbase", "couchbase.png", "localhost", "format: host:port. If cluster: host:port1,host:port2,...");
public final String name;
public final Icon icon;
public final String defaultUrl;
public final String tips;
DatabaseVendor(String name, String iconFilename, String defaultUrl, String tips) {
this.name = name;
this.icon = GuiUtils.loadIcon(iconFilename);
this.defaultUrl = defaultUrl;
this.tips = tips;
}
@Override
public String toString() {
return "DatabaseVendor{name='" + name + "'}";
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorClientManager.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import org.codinjutsu.tools.nosql.commons.logic.DatabaseClient;
import org.codinjutsu.tools.nosql.commons.model.DatabaseServer;
import org.codinjutsu.tools.nosql.couchbase.logic.CouchbaseClient;
import org.codinjutsu.tools.nosql.mongo.logic.MongoClient;
import org.codinjutsu.tools.nosql.redis.logic.RedisClient;
import java.util.HashMap;
import java.util.Map;
public class DatabaseVendorClientManager {
private static final Map<DatabaseVendor, Class<? extends DatabaseClient>> dataClientByVendor = new HashMap<>();
static {
dataClientByVendor.put(DatabaseVendor.MONGO, MongoClient.class);
dataClientByVendor.put(DatabaseVendor.REDIS, RedisClient.class);
dataClientByVendor.put(DatabaseVendor.COUCHBASE, CouchbaseClient.class);
}
private final Project project;
public DatabaseVendorClientManager(Project project) {
this.project = project;
}
public static DatabaseVendorClientManager getInstance(Project project) {
return ServiceManager.getService(project, DatabaseVendorClientManager.class);
}
public DatabaseClient get(DatabaseVendor databaseVendor) {
return ServiceManager.getService(project, dataClientByVendor.get(databaseVendor));
}
public void cleanUpServers() {
for (DatabaseVendor databaseVendor : dataClientByVendor.keySet()) {
this.get(databaseVendor).cleanUpServers();
}
}
public void registerServer(DatabaseServer databaseServer) {
this.get(databaseServer.getConfiguration().getDatabaseVendor()).registerServer(databaseServer);
}
public void loadServer(DatabaseServer databaseServer) {
this.get(databaseServer.getConfiguration().getDatabaseVendor()).loadServer(databaseServer);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorUIManager.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import org.codinjutsu.tools.nosql.commons.DatabaseUI;
import org.codinjutsu.tools.nosql.couchbase.CouchbaseUI;
import org.codinjutsu.tools.nosql.couchbase.view.editor.CouchbaseObjectFile;
import org.codinjutsu.tools.nosql.mongo.MongoUI;
import org.codinjutsu.tools.nosql.mongo.view.editor.MongoObjectFile;
import org.codinjutsu.tools.nosql.redis.RedisUI;
import org.codinjutsu.tools.nosql.redis.view.editor.RedisObjectFile;
import java.util.HashMap;
import java.util.Map;
public class DatabaseVendorUIManager {
private static final Map<DatabaseVendor, Class<? extends DatabaseUI>> databaseUIByVendor = new HashMap<>();
static {
databaseUIByVendor.put(DatabaseVendor.MONGO, MongoUI.class);
databaseUIByVendor.put(DatabaseVendor.REDIS, RedisUI.class);
databaseUIByVendor.put(DatabaseVendor.COUCHBASE, CouchbaseUI.class);
}
private final Project project;
public DatabaseVendorUIManager(Project project) {
this.project = project;
}
public static DatabaseVendorUIManager getInstance(Project project) {
return ServiceManager.getService(project, DatabaseVendorUIManager.class);
}
public DatabaseUI get(DatabaseVendor databaseVendor) {
return ServiceManager.getService(project, databaseUIByVendor.get(databaseVendor));
}
public boolean accept(VirtualFile file) {
return file instanceof MongoObjectFile || file instanceof RedisObjectFile || file instanceof CouchbaseObjectFile;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlComponent.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.components.AbstractProjectComponent;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
public class NoSqlComponent extends AbstractProjectComponent {
private static final String COMPONENT_NAME = "NoSql";
public NoSqlComponent(Project project) {
super(project);
}
@NotNull
public String getComponentName() {
return COMPONENT_NAME;
}
public void projectOpened() {
NoSqlWindowManager.getInstance(myProject);
}
public void projectClosed() {
NoSqlWindowManager.getInstance(myProject).unregisterMyself();
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlConfigurable.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.process.CapturingProcessHandler;
import com.intellij.execution.process.ProcessOutput;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.options.BaseConfigurable;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.LabeledComponent;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.openapi.util.ThrowableComputable;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.ui.*;
import com.intellij.ui.table.JBTable;
import org.apache.commons.lang.StringUtils;
import org.codinjutsu.tools.nosql.commons.view.ServerConfigurationPanelFactory;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableColumn;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeoutException;
import static org.apache.commons.lang.StringUtils.isBlank;
public class NoSqlConfigurable extends BaseConfigurable {
private final Project project;
private final NoSqlConfiguration configuration;
private final List<ServerConfiguration> configurations;
private final ServerConfigurationPanelFactory serverConfigurationPanelFactory;
private final DatabaseVendorClientManager databaseVendorClientManager;
private JPanel mainPanel;
private JBTable table;
private final NoSqlServerTableModel tableModel;
private ShellPathPanel mongoShellPanel;
private ShellPathPanel redisShellPanel;
public NoSqlConfigurable(Project project) {
this.project = project;
this.configuration = NoSqlConfiguration.getInstance(project);
databaseVendorClientManager = DatabaseVendorClientManager.getInstance(project);
this.serverConfigurationPanelFactory = new ServerConfigurationPanelFactory(
project,
databaseVendorClientManager,
DatabaseVendorUIManager.getInstance(project)
);
configurations = new LinkedList<>(this.configuration.getServerConfigurations());
tableModel = new NoSqlServerTableModel(configurations);
mainPanel = new JPanel(new BorderLayout());
}
@Nls
@Override
public String getDisplayName() {
return "NoSql Servers";
}
@Nullable
@Override
public String getHelpTopic() {
return "preferences.noSqlOptions";
}
@Nullable
@Override
public JComponent createComponent() {
JPanel databaseVendorShellOptionsPanel = new JPanel();
databaseVendorShellOptionsPanel.setLayout(new BoxLayout(databaseVendorShellOptionsPanel, BoxLayout.Y_AXIS));
mongoShellPanel = new ShellPathPanel(DatabaseVendor.MONGO, "--version");
databaseVendorShellOptionsPanel.add(mongoShellPanel);
redisShellPanel = new ShellPathPanel(DatabaseVendor.REDIS, "--version");
databaseVendorShellOptionsPanel.add(redisShellPanel);
mainPanel.add(databaseVendorShellOptionsPanel, BorderLayout.NORTH);
PanelWithButtons panelWithButtons = new PanelWithButtons() {
{
initPanel();
}
@Nullable
@Override
protected String getLabelText() {
return "Servers";
}
@Override
protected JButton[] createButtons() {
return new JButton[]{};
}
@Override
protected JComponent createMainComponent() {
table = new JBTable(tableModel);
table.getEmptyText().setText("No server configuration set");
table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.setDefaultRenderer(DatabaseVendor.class, new ColoredTableCellRenderer() {
@Override
protected void customizeCellRenderer(JTable jTable, Object value, boolean b, boolean b1, int i, int i1) {
DatabaseVendor databaseVendor = (DatabaseVendor) value;
this.setIcon(databaseVendor.icon);
this.append(databaseVendor.name);
}
});
TableColumn autoConnectColumn = table.getColumnModel().getColumn(3);
int autoConnectColumnWidth = table.getFontMetrics(table.getFont()).stringWidth(table.getColumnName(3)) + 10;
autoConnectColumn.setPreferredWidth(autoConnectColumnWidth);
autoConnectColumn.setMaxWidth(autoConnectColumnWidth);
autoConnectColumn.setMinWidth(autoConnectColumnWidth);
return ToolbarDecorator.createDecorator(table)
.setAddAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
stopEditing();
SelectDatabaseVendorDialog databaseVendorDialog = new SelectDatabaseVendorDialog(mainPanel);
databaseVendorDialog.setTitle("Add a NoSql Server");
databaseVendorDialog.show();
if (!databaseVendorDialog.isOK()) {
return;
}
DatabaseVendor selectedDatabaseVendor = databaseVendorDialog.getSelectedDatabaseVendor();
ServerConfiguration serverConfiguration = databaseVendorClientManager.get(selectedDatabaseVendor).defaultConfiguration();
serverConfiguration.setDatabaseVendor(selectedDatabaseVendor);
ConfigurationDialog dialog = new ConfigurationDialog(
mainPanel,
serverConfigurationPanelFactory,
serverConfiguration
);
dialog.setTitle("Add a NoSql Server");
dialog.show();
if (!dialog.isOK()) {
return;
}
configurations.add(serverConfiguration);
int index = configurations.size() - 1;
tableModel.fireTableRowsInserted(index, index);
table.getSelectionModel().setSelectionInterval(index, index);
table.scrollRectToVisible(table.getCellRect(index, 0, true));
}
})
.setAddActionName("addServer")
.setEditAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
stopEditing();
int selectedIndex = table.getSelectedRow();
if (selectedIndex < 0 || selectedIndex >= tableModel.getRowCount()) {
return;
}
ServerConfiguration sourceConfiguration = configurations.get(selectedIndex);
ServerConfiguration copiedConfiguration = sourceConfiguration.clone();
ConfigurationDialog dialog = new ConfigurationDialog(
mainPanel,
serverConfigurationPanelFactory,
copiedConfiguration
);
dialog.setTitle("Edit a NoSql Server");
dialog.show();
if (!dialog.isOK()) {
return;
}
configurations.set(selectedIndex, copiedConfiguration);
tableModel.fireTableRowsUpdated(selectedIndex, selectedIndex);
table.getSelectionModel().setSelectionInterval(selectedIndex, selectedIndex);
}
})
.setEditActionName("editServer")
.setRemoveAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
stopEditing();
int selectedIndex = table.getSelectedRow();
if (selectedIndex < 0 || selectedIndex >= tableModel.getRowCount()) {
return;
}
TableUtil.removeSelectedItems(table);
}
})
.setRemoveActionName("removeServer")
.disableUpDownActions().createPanel();
}
};
mainPanel.add(panelWithButtons, BorderLayout.CENTER);
return mainPanel;
}
public boolean isModified() {
return areConfigurationsModified() || isRedisShellPathModified();
}
@Override
public void apply() throws ConfigurationException {
stopEditing();
if (areConfigurationsModified()) {
configuration.setServerConfigurations(configurations);
}
if (isMongoShellPathModified()) {
configuration.setShellPath(DatabaseVendor.MONGO, mongoShellPanel.getShellPath());
}
if (isRedisShellPathModified()) {
configuration.setShellPath(DatabaseVendor.REDIS, redisShellPanel.getShellPath());
}
NoSqlWindowManager.getInstance(project).apply();
}
private boolean isMongoShellPathModified() {
return mongoShellPanel.isShellPathModified(NoSqlConfiguration.getInstance(project).getShellPath(DatabaseVendor.MONGO));
}
private boolean isRedisShellPathModified() {
return redisShellPanel.isShellPathModified(NoSqlConfiguration.getInstance(project).getShellPath(DatabaseVendor.REDIS));
}
private boolean areConfigurationsModified() {
List<ServerConfiguration> existingConfigurations = NoSqlConfiguration.getInstance(project).getServerConfigurations();
if (configurations.size() != existingConfigurations.size()) {
return true;
}
for (ServerConfiguration existingConfiguration : existingConfigurations) {
if (!configurations.contains(existingConfiguration)) {
return true;
}
}
return false;
}
@Override
public void reset() {
}
@Override
public void disposeUIResources() {
mainPanel = null;
tableModel.removeTableModelListener(table);
mongoShellPanel.dispose();
redisShellPanel.dispose();
table = null;
}
private void stopEditing() {
if (table.isEditing()) {
TableCellEditor editor = table.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
}
}
private class ShellPathPanel extends JPanel implements Disposable {
private static final int TIMEOUT_MS = 60 * 1000;
private final String testParameter;
private LabeledComponent<TextFieldWithBrowseButton> shellPathField;
private ShellPathPanel(DatabaseVendor databaseVendor, String testParameter) {
this.testParameter = testParameter;
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(createLabel(databaseVendor.name));
shellPathField = createShellPathField(databaseVendor);
add(shellPathField);
add(createTestButton(databaseVendor));
}
private JLabel createLabel(String databaseVendorName) {
return new JLabel(String.format("Path to %s CLI:\t\t", databaseVendorName));
}
private JButton createTestButton(final DatabaseVendor databaseVendorName) {
JButton testButton = new JButton("Test");
testButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
testPath(databaseVendorName);
}
});
return testButton;
}
private void testPath(final DatabaseVendor databaseVendor) {
ProcessOutput processOutput;
try {
processOutput = ProgressManager.getInstance().runProcessWithProgressSynchronously(new ThrowableComputable<ProcessOutput, Exception>() {
@Override
public ProcessOutput compute() throws Exception {
return checkShellPath(databaseVendor, getShellPath());
}
}, "Testing " + databaseVendor.name + " CLI Executable...", true, NoSqlConfigurable.this.project);
} catch (ProcessCanceledException pce) {
return;
} catch (Exception e) {
Messages.showErrorDialog(mainPanel, e.getMessage(), "Something wrong happened");
return;
}
if (processOutput != null && processOutput.getExitCode() == 0) {
Messages.showInfoMessage(mainPanel, processOutput.getStdout(), databaseVendor.name + " CLI Path Checked");
}
}
public ProcessOutput checkShellPath(DatabaseVendor databaseVendor, String shellPath) throws ExecutionException, TimeoutException {
if (isBlank(shellPath)) {
return null;
}
GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath(shellPath);
if (testParameter != null) {
commandLine.addParameter(testParameter);
}
CapturingProcessHandler handler = new CapturingProcessHandler(commandLine.createProcess(), CharsetToolkit.getDefaultSystemCharset());
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
ProcessOutput result = indicator == null ?
handler.runProcess(TIMEOUT_MS) :
handler.runProcessWithProgressIndicator(indicator);
if (result.isTimeout()) {
throw new TimeoutException("Couldn't check " + databaseVendor.name + " CLI executable - stopped by timeout.");
} else if (result.isCancelled()) {
throw new ProcessCanceledException();
} else if (result.getExitCode() != 0 || !result.getStderr().isEmpty()) {
throw new ExecutionException(String.format("Errors while executing %s. exitCode=%s errors: %s",
commandLine.toString(),
result.getExitCode(),
result.getStderr()));
}
return result;
}
public String getShellPath() {
String shellPath = shellPathField.getComponent().getText();
if (StringUtils.isNotBlank(shellPath)) {
return shellPath;
}
return null;
}
public boolean isShellPathModified(String shellPath) {
return !StringUtils.equals(shellPath, getShellPath());
}
private LabeledComponent<TextFieldWithBrowseButton> createShellPathField(DatabaseVendor databaseVendor) {
LabeledComponent<TextFieldWithBrowseButton> shellPathField = new LabeledComponent<>();
TextFieldWithBrowseButton component = new TextFieldWithBrowseButton();
component.getChildComponent().setName("shellPathField");
shellPathField.setComponent(component);
shellPathField.getComponent().addBrowseFolderListener(String.format("%s CLI configuration", databaseVendor.name), "", null,
new FileChooserDescriptor(true, false, false, false, false, false));
shellPathField.getComponent().setText(configuration.getShellPath(databaseVendor));
return shellPathField;
}
@Override
public void dispose() {
shellPathField = null;
}
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlConfiguration.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.components.*;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@SuppressWarnings("unused")
@State(
name = "NoSqlConfiguration",
storages = {
@Storage(file = "$PROJECT_FILE$"),
@Storage(file = "$PROJECT_CONFIG_DIR$/noSqlSettings.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
public class NoSqlConfiguration implements PersistentStateComponent<NoSqlConfiguration> {
private List<ServerConfiguration> serverConfigurations = new LinkedList<ServerConfiguration>();
private Map<DatabaseVendor, String> shellPathByDatabaseVendor = new HashMap<DatabaseVendor, String>();
public static NoSqlConfiguration getInstance(Project project) {
return ServiceManager.getService(project, NoSqlConfiguration.class);
}
public NoSqlConfiguration getState() {
return this;
}
public void loadState(NoSqlConfiguration noSqlConfiguration) {
XmlSerializerUtil.copyBean(noSqlConfiguration, this);
}
public void setServerConfigurations(List<ServerConfiguration> serverConfigurations) {
this.serverConfigurations = serverConfigurations;
}
public List<ServerConfiguration> getServerConfigurations() {
return serverConfigurations;
}
public String getShellPath(DatabaseVendor databaseVendor) {
return shellPathByDatabaseVendor.get(databaseVendor);
}
public void setShellPathByDatabaseVendor(Map<DatabaseVendor, String> shellPathByDatabaseVendor) {
this.shellPathByDatabaseVendor = shellPathByDatabaseVendor;
}
public Map<DatabaseVendor, String> getShellPathByDatabaseVendor() {
return shellPathByDatabaseVendor;
}
public void setShellPath(DatabaseVendor databaseVendor, String shellPath) {
shellPathByDatabaseVendor.put(databaseVendor, shellPath);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlExplorerPanel.form
================================================
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.codinjutsu.tools.nosql.NoSqlExplorerPanel">
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="9cc34" binding="toolBarPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="b900" binding="treePanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</form>
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlExplorerPanel.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.ide.CommonActionsManager;
import com.intellij.ide.TreeExpander;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.util.Disposer;
import com.intellij.ui.PopupHandler;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.ui.treeStructure.Tree;
import com.intellij.util.ui.tree.TreeUtil;
import org.codinjutsu.tools.nosql.commons.logic.ConfigurationException;
import org.codinjutsu.tools.nosql.commons.logic.DatabaseClient;
import org.codinjutsu.tools.nosql.commons.model.Database;
import org.codinjutsu.tools.nosql.commons.model.DatabaseServer;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import org.codinjutsu.tools.nosql.commons.view.action.NoSqlDatabaseConsoleAction;
import org.codinjutsu.tools.nosql.commons.view.action.OpenPluginSettingsAction;
import org.codinjutsu.tools.nosql.commons.view.action.RefreshServerAction;
import org.codinjutsu.tools.nosql.commons.view.action.ViewCollectionValuesAction;
import org.codinjutsu.tools.nosql.commons.view.editor.NoSqlDatabaseFileSystem;
import org.codinjutsu.tools.nosql.commons.view.editor.NoSqlDatabaseObjectFile;
import org.codinjutsu.tools.nosql.couchbase.model.CouchbaseDatabase;
import org.codinjutsu.tools.nosql.couchbase.view.editor.CouchbaseObjectFile;
import org.codinjutsu.tools.nosql.mongo.logic.MongoClient;
import org.codinjutsu.tools.nosql.mongo.model.MongoCollection;
import org.codinjutsu.tools.nosql.mongo.model.MongoDatabase;
import org.codinjutsu.tools.nosql.mongo.view.action.DropCollectionAction;
import org.codinjutsu.tools.nosql.mongo.view.action.DropDatabaseAction;
import org.codinjutsu.tools.nosql.mongo.view.editor.MongoObjectFile;
import org.codinjutsu.tools.nosql.redis.model.RedisDatabase;
import org.codinjutsu.tools.nosql.redis.view.editor.RedisObjectFile;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeSelectionModel;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.net.URL;
import java.util.List;
import static org.codinjutsu.tools.nosql.commons.utils.GuiUtils.showNotification;
public class NoSqlExplorerPanel extends JPanel implements Disposable {
private static final URL pluginSettingsUrl = GuiUtils.isUnderDarcula() ? GuiUtils.getIconResource("pluginSettings_dark.png") : GuiUtils.getIconResource("pluginSettings.png");
private JPanel rootPanel;
private JPanel treePanel;
private Tree databaseTree;
private JPanel toolBarPanel;
private final Project project;
private final DatabaseVendorClientManager databaseVendorClientManager;
public NoSqlExplorerPanel(Project project, DatabaseVendorClientManager databaseVendorClientManager) {
this.project = project;
this.databaseVendorClientManager = databaseVendorClientManager;
treePanel.setLayout(new BorderLayout());
databaseTree = createTree();
databaseTree.setCellRenderer(new NoSqlTreeRenderer());
databaseTree.setName("databaseTree");
JBScrollPane mongoTreeScrollPane = new JBScrollPane(databaseTree);
setLayout(new BorderLayout());
treePanel.add(mongoTreeScrollPane, BorderLayout.CENTER);
add(rootPanel, BorderLayout.CENTER);
toolBarPanel.setLayout(new BorderLayout());
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
reloadAllServerConfigurations();
}
});
}
public void reloadAllServerConfigurations() {
this.databaseVendorClientManager.cleanUpServers();
databaseTree.setRootVisible(false);
List<ServerConfiguration> serverConfigurations = getServerConfigurations();
if (serverConfigurations.size() == 0) {
databaseTree.setModel(null);
return;
}
final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();
databaseTree.setModel(new DefaultTreeModel(rootNode));
for (ServerConfiguration serverConfiguration : serverConfigurations) {
DatabaseServer mongoServer = new DatabaseServer(serverConfiguration);
this.databaseVendorClientManager.registerServer(mongoServer);
DefaultMutableTreeNode serverNode = new DefaultMutableTreeNode(mongoServer);
rootNode.add(serverNode);
if (serverConfiguration.isConnectOnIdeStartup()) {
this.reloadServerConfiguration(serverNode, false);
}
}
TreeUtil.expand(databaseTree, 2);
}
public void reloadServerConfiguration(final DefaultMutableTreeNode serverNode, final boolean expandAfterLoading) {
databaseTree.setPaintBusy(true);
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
final DatabaseServer databaseServer = (DatabaseServer) serverNode.getUserObject();
try {
databaseVendorClientManager.loadServer(databaseServer);
GuiUtils.runInSwingThread(new Runnable() {
@Override
public void run() {
databaseTree.invalidate();
serverNode.removeAllChildren();
addDatabasesIfAny(databaseServer, serverNode);
((DefaultTreeModel) databaseTree.getModel()).reload(serverNode);
databaseTree.revalidate();
if (expandAfterLoading) {
GuiUtils.expand(databaseTree, TreeUtil.getPathFromRoot(serverNode), 1);
}
}
});
} catch (ConfigurationException confEx) {
databaseServer.setStatus(DatabaseServer.Status.ERROR);
showNotification(treePanel,
MessageType.ERROR,
String.format("Error when connecting on %s", databaseServer.getLabel()),
Balloon.Position.atLeft);
} finally {
databaseTree.setPaintBusy(false);
}
}
});
}
private void addDatabasesIfAny(DatabaseServer databaseServer, DefaultMutableTreeNode serverNode) {
for (Database database : databaseServer.getDatabases()) {
DefaultMutableTreeNode databaseNode = new DefaultMutableTreeNode(database);
if (database instanceof MongoDatabase) {
MongoDatabase mongoDatabase = (MongoDatabase) database;
for (MongoCollection collection : mongoDatabase.getCollections()) {
databaseNode.add(new DefaultMutableTreeNode(collection));
}
}
serverNode.add(databaseNode);
}
}
private List<ServerConfiguration> getServerConfigurations() {
return NoSqlConfiguration.getInstance(project).getServerConfigurations();
}
public void installActions() {
final TreeExpander treeExpander = new TreeExpander() {
@Override
public void expandAll() {
NoSqlExplorerPanel.this.expandAll();
}
@Override
public boolean canExpand() {
return true;
}
@Override
public void collapseAll() {
NoSqlExplorerPanel.this.collapseAll();
}
@Override
public boolean canCollapse() {
return true;
}
};
CommonActionsManager actionsManager = CommonActionsManager.getInstance();
final AnAction expandAllAction = actionsManager.createExpandAllAction(treeExpander, rootPanel);
final AnAction collapseAllAction = actionsManager.createCollapseAllAction(treeExpander, rootPanel);
Disposer.register(this, new Disposable() {
@Override
public void dispose() {
collapseAllAction.unregisterCustomShortcutSet(rootPanel);
expandAllAction.unregisterCustomShortcutSet(rootPanel);
}
});
DefaultActionGroup actionGroup = new DefaultActionGroup("NoSqlExplorerGroup", false);
ViewCollectionValuesAction viewCollectionValuesAction = new ViewCollectionValuesAction(this);
RefreshServerAction refreshServerAction = new RefreshServerAction(this);
if (ApplicationManager.getApplication() != null) {
actionGroup.add(refreshServerAction);
actionGroup.add(new NoSqlDatabaseConsoleAction(this));
actionGroup.add(viewCollectionValuesAction);
actionGroup.add(expandAllAction);
actionGroup.add(collapseAllAction);
actionGroup.addSeparator();
actionGroup.add(new OpenPluginSettingsAction());
}
GuiUtils.installActionGroupInToolBar(actionGroup, toolBarPanel, ActionManager.getInstance(), "NoSqlExplorerActions", true);
DefaultActionGroup actionPopupGroup = new DefaultActionGroup("NoSqlExplorerPopupGroup", true);
if (ApplicationManager.getApplication() != null) {
actionPopupGroup.add(refreshServerAction);
actionPopupGroup.add(viewCollectionValuesAction);
actionPopupGroup.add(new DropCollectionAction(this));
actionPopupGroup.add(new DropDatabaseAction(this));
}
PopupHandler.installPopupHandler(databaseTree, actionPopupGroup, "POPUP", ActionManager.getInstance());
databaseTree.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent mouseEvent) {
if (!(mouseEvent.getSource() instanceof JTree)) {
return;
}
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) databaseTree.getLastSelectedPathComponent();
if (treeNode == null) {
return;
}
if (mouseEvent.getClickCount() == 2) {
if (treeNode.getUserObject() instanceof DatabaseServer && treeNode.getChildCount() == 0) {
reloadServerConfiguration(getSelectedServerNode(), true);
}
if (treeNode.getUserObject() instanceof MongoCollection) {
loadRecords();
}
if (treeNode.getUserObject() instanceof RedisDatabase) {
loadRecords();
}
if (treeNode.getUserObject() instanceof CouchbaseDatabase) {
loadRecords();
}
}
}
});
}
private void expandAll() {
TreeUtil.expandAll(databaseTree);
}
private void collapseAll() {
TreeUtil.collapseAll(databaseTree, 1);
}
@Override
public void dispose() {
databaseTree = null;
}
public DefaultMutableTreeNode getSelectedServerNode() {
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) databaseTree.getLastSelectedPathComponent();
if (treeNode != null) {
Object userObject = treeNode.getUserObject();
if (userObject instanceof MongoCollection) {
return (DefaultMutableTreeNode) treeNode.getParent().getParent();
}
if (userObject instanceof Database) {
return (DefaultMutableTreeNode) treeNode.getParent();
}
if (userObject instanceof DatabaseServer) {
return treeNode;
}
}
return null;
}
private DefaultMutableTreeNode getSelectedDatabaseNode() {
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) databaseTree.getLastSelectedPathComponent();
if (treeNode != null) {
Object userObject = treeNode.getUserObject();
// if (userObject instanceof MongoCollection) {
// return (DefaultMutableTreeNode) treeNode.getParent();
// }
if (userObject instanceof Database) {
return treeNode;
}
}
return null;
}
private DefaultMutableTreeNode getSelectedCollectionNode() {
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) databaseTree.getLastSelectedPathComponent();
if (treeNode != null) {
Object userObject = treeNode.getUserObject();
if (userObject instanceof MongoCollection) {
return treeNode;
}
}
return null;
}
public ServerConfiguration getConfiguration() {
DefaultMutableTreeNode serverNode = getSelectedServerNode();
if (serverNode == null) {
return null;
}
return ((DatabaseServer) serverNode.getUserObject()).getConfiguration();
}
public RedisDatabase getSelectedRedisDatabase() {
DefaultMutableTreeNode databaseNode = getSelectedDatabaseNode();
if (databaseNode == null) {
return null;
}
Object database = databaseNode.getUserObject();
if (!(database instanceof RedisDatabase)) {
return null;
}
return (RedisDatabase) database;
}
public CouchbaseDatabase getSelectedCouchaseDatabase() {
DefaultMutableTreeNode databaseNode = getSelectedDatabaseNode();
if (databaseNode == null) {
return null;
}
Object database = databaseNode.getUserObject();
if (!(database instanceof CouchbaseDatabase)) {
return null;
}
return (CouchbaseDatabase) database;
}
public MongoDatabase getSelectedMongoDatabase() {
DefaultMutableTreeNode databaseNode = getSelectedDatabaseNode();
if (databaseNode == null) {
return null;
}
Object database = databaseNode.getUserObject();
if (!(database instanceof MongoDatabase)) {
return null;
}
return (MongoDatabase) databaseNode.getUserObject();
}
public MongoCollection getSelectedCollection() {
DefaultMutableTreeNode collectionNode = getSelectedCollectionNode();
if (collectionNode == null) {
return null;
}
return (MongoCollection) collectionNode.getUserObject();
}
public void loadRecords() {
NoSqlDatabaseFileSystem.getInstance().openEditor(createNoSqlObjectFile());
}
@NotNull
private NoSqlDatabaseObjectFile createNoSqlObjectFile() { // TODO need to put in the database UI manager
ServerConfiguration selectedConfiguration = getConfiguration();
if (DatabaseVendor.MONGO.equals(selectedConfiguration.getDatabaseVendor())) {
return new MongoObjectFile(project, selectedConfiguration, getSelectedCollection());
} else if (DatabaseVendor.COUCHBASE.equals(selectedConfiguration.getDatabaseVendor())) {
return new CouchbaseObjectFile(project, selectedConfiguration, getSelectedCouchaseDatabase());
}
return new RedisObjectFile(project, selectedConfiguration, getSelectedRedisDatabase());
}
public void dropCollection() {// TODO need to put in a customizer
MongoClient databaseClient = (MongoClient) databaseVendorClientManager.get(DatabaseVendor.MONGO);
databaseClient.dropCollection(getConfiguration(), getSelectedCollection());
reloadServerConfiguration(getSelectedServerNode(), true);
}
public void dropDatabase() {// TODO need to put in a customizer
MongoClient databaseClient = (MongoClient) databaseVendorClientManager.get(DatabaseVendor.MONGO);
databaseClient.dropDatabase(getConfiguration(), getSelectedMongoDatabase());
reloadServerConfiguration(getSelectedServerNode(), true);
}
private Tree createTree() {
Tree tree = new Tree() {
private final JLabel myLabel = new JLabel(
String.format("<html><center>NoSql server list is empty<br><br>You may use <img src=\"%s\"> to add configuration</center></html>", pluginSettingsUrl)
);
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
if (!getServerConfigurations().isEmpty()) return;
myLabel.setFont(getFont());
myLabel.setBackground(getBackground());
myLabel.setForeground(getForeground());
Rectangle bounds = getBounds();
Dimension size = myLabel.getPreferredSize();
myLabel.setBounds(0, 0, size.width, size.height);
int x = (bounds.width - size.width) / 2;
Graphics g2 = g.create(bounds.x + x, bounds.y + 20, bounds.width, bounds.height);
try {
myLabel.paint(g2);
} finally {
g2.dispose();
}
}
};
tree.getEmptyText().clear();
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
return tree;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlServerTableModel.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.util.ui.ItemRemovable;
import javax.swing.table.AbstractTableModel;
import java.util.List;
class NoSqlServerTableModel extends AbstractTableModel implements ItemRemovable {
private final String[] columnNames = new String[]{
"Label",
"Vendor",
"URL",
"Autoconnect"
};
private final Class[] columnClasses = new Class[]{String.class, DatabaseVendor.class, String.class, Boolean.class};
private final List<ServerConfiguration> mongoServerConfigurations;
public NoSqlServerTableModel(List<ServerConfiguration> mongoServerConfigurations) {
this.mongoServerConfigurations = mongoServerConfigurations;
}
public String getColumnName(int column) {
return columnNames[column];
}
public Class getColumnClass(int column) {
return columnClasses[column];
}
public int getColumnCount() {
return columnNames.length;
}
public int getRowCount() {
return mongoServerConfigurations.size();
}
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return false;
}
public Object getValueAt(int row, int column) {
ServerConfiguration configuration = mongoServerConfigurations.get(row);
switch (column) {
case 0: { // "Label" column
return configuration.getLabel();
}
case 1: { // "Vendor" column
return configuration.getDatabaseVendor();
}
case 2: { // "URL" column
return configuration.getServerUrl();
}
case 3: { // "Autoconnect" column
return configuration.isConnectOnIdeStartup();
}
default: {
throw new IllegalArgumentException();
}
}
}
public void setValueAt(Object value, int row, int column) {
ServerConfiguration configuration = mongoServerConfigurations.get(row);
switch (column) {
case 0: {
configuration.setLabel((String) value);
break;
}
case 1: {
//do nothing ??
break;
}
case 2: {
//do nothing url = serverHosts
break;
}
case 3: {
configuration.setConnectOnIdeStartup((Boolean) value);
break;
}
default: {
throw new IllegalArgumentException();
}
}
}
public void removeRow(int index) {
mongoServerConfigurations.remove(index);
fireTableRowsDeleted(index, index);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlTreeRenderer.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.icons.AllIcons;
import com.intellij.ui.ColoredTreeCellRenderer;
import com.intellij.ui.JBColor;
import org.apache.commons.lang.StringUtils;
import org.codinjutsu.tools.nosql.commons.model.Database;
import org.codinjutsu.tools.nosql.commons.model.DatabaseServer;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import org.codinjutsu.tools.nosql.mongo.model.MongoCollection;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
public class NoSqlTreeRenderer extends ColoredTreeCellRenderer {
private static final Icon DATABASE = GuiUtils.loadIcon("database.png");
private static final Icon MONGO_COLLECTION = AllIcons.Nodes.Folder;
@Override
public void customizeCellRenderer(@NotNull JTree mongoTree, Object value, boolean isSelected, boolean isExpanded, boolean isLeaf, int row, boolean focus) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
Object userObject = node.getUserObject();
if (userObject instanceof DatabaseServer) {
DatabaseServer mongoServer = (DatabaseServer) userObject;
String label = mongoServer.getLabel();
String host = mongoServer.getServerUrl();
append(StringUtils.isBlank(label) ? host : label);
if (DatabaseServer.Status.OK.equals(mongoServer.getStatus())) {
setToolTipText(host);
setIcon(mongoServer.getConfiguration().getDatabaseVendor().icon);
} else {
setForeground(JBColor.RED);
setToolTipText("Unable to connect");
}
} else if (userObject instanceof Database) {
Database noSqlDatabase = (Database) userObject;
append(noSqlDatabase.getName());
setIcon(DATABASE);
} else if (userObject instanceof MongoCollection) {
MongoCollection mongoCollection = (MongoCollection) userObject;
append(mongoCollection.getName());
setIcon(MONGO_COLLECTION);
}
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlWindowManager.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowAnchor;
import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import javax.swing.*;
public class NoSqlWindowManager {
private static final Icon NOSQL_ICON = GuiUtils.loadIcon("nosql_13x13.png");
public static final String NOSQL_RUNNER = "NoSql Runner";
private static final String NOSQL_EXPLORER = "NoSql Explorer";
private final Project project;
private final NoSqlExplorerPanel noSqlExplorerPanel;
public static NoSqlWindowManager getInstance(Project project) {
return ServiceManager.getService(project, NoSqlWindowManager.class);
}
public NoSqlWindowManager(Project project) {
this.project = project;
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
noSqlExplorerPanel = new NoSqlExplorerPanel(project, DatabaseVendorClientManager.getInstance(project));
noSqlExplorerPanel.installActions();
Content nosqlExplorer = ContentFactory.SERVICE.getInstance().createContent(noSqlExplorerPanel, null, false);
ToolWindow toolNoSqlExplorerWindow = toolWindowManager.registerToolWindow(NOSQL_EXPLORER, false, ToolWindowAnchor.RIGHT);
toolNoSqlExplorerWindow.getContentManager().addContent(nosqlExplorer);
toolNoSqlExplorerWindow.setIcon(NOSQL_ICON);
}
public void unregisterMyself() {
ToolWindowManager.getInstance(project).unregisterToolWindow(NOSQL_RUNNER);
ToolWindowManager.getInstance(project).unregisterToolWindow(NOSQL_EXPLORER);
}
public void apply() {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
noSqlExplorerPanel.reloadAllServerConfigurations();
}
});
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/SelectDatabaseVendorDialog.form
================================================
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.codinjutsu.tools.nosql.SelectDatabaseVendorDialog">
<grid id="27dc6" binding="mainPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="5d1ce" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Database Vendor:"/>
</properties>
</component>
<vspacer id="5dc43">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="6fcf8" class="com.intellij.openapi.ui.ComboBox" binding="databaseVendorCombobox">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
</form>
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/SelectDatabaseVendorDialog.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import com.intellij.openapi.ui.ComboBox;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.ColoredListCellRenderer;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
public class SelectDatabaseVendorDialog extends DialogWrapper {
private JPanel mainPanel;
private ComboBox databaseVendorCombobox;
protected SelectDatabaseVendorDialog(Component parent) {
super(parent, true);
databaseVendorCombobox.setName("databaseVendorCombobox");
init();
}
@Nullable
@Override
protected JComponent createCenterPanel() {
return mainPanel;
}
@Override
protected void init() {
super.init();
initCombobox();
}
private void initCombobox() {
databaseVendorCombobox.setModel(new DefaultComboBoxModel(DatabaseVendor.values()));
databaseVendorCombobox.setRenderer(new ColoredListCellRenderer() {
@Override
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
DatabaseVendor databaseVendor = (DatabaseVendor) value;
setIcon(databaseVendor.icon);
append(databaseVendor.name);
}
});
databaseVendorCombobox.setSelectedItem(DatabaseVendor.MONGO);
}
public DatabaseVendor getSelectedDatabaseVendor() {
return (DatabaseVendor) databaseVendorCombobox.getSelectedItem();
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/ServerConfiguration.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql;
import org.codinjutsu.tools.nosql.commons.model.AuthenticationSettings;
public class ServerConfiguration implements Cloneable {
private String label;
private DatabaseVendor databaseVendor = DatabaseVendor.MONGO;
private String serverUrl;
private String userDatabase;
private boolean connectOnIdeStartup = false;
private String shellArgumentsLine;
private String shellWorkingDir;
private AuthenticationSettings authenticationSettings = new AuthenticationSettings();
public DatabaseVendor getDatabaseVendor() {
return databaseVendor;
}
public void setDatabaseVendor(DatabaseVendor databaseVendor) {
this.databaseVendor = databaseVendor;
}
public String getServerUrl() {
return serverUrl;
}
public void setServerUrl(String serverUrl) {
this.serverUrl = serverUrl;
}
public void setUserDatabase(String userDatabase) {
this.userDatabase = userDatabase;
}
public String getUserDatabase() {
return userDatabase;
}
public boolean isConnectOnIdeStartup() {
return connectOnIdeStartup;
}
public void setConnectOnIdeStartup(boolean connectOnIdeStartup) {
this.connectOnIdeStartup = connectOnIdeStartup;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getShellArgumentsLine() {
return shellArgumentsLine;
}
public void setShellArgumentsLine(String shellArgumentsLine) {
this.shellArgumentsLine = shellArgumentsLine;
}
public String getShellWorkingDir() {
return shellWorkingDir;
}
public void setShellWorkingDir(String shellWorkingDir) {
this.shellWorkingDir = shellWorkingDir;
}
public boolean isSingleServer() {
return serverUrl.split(",").length == 1;
}
public void setAuthenticationSettings(AuthenticationSettings authenticationSettings) {
this.authenticationSettings = authenticationSettings;
}
public AuthenticationSettings getAuthenticationSettings() {
return authenticationSettings;
}
public ServerConfiguration clone() {
try {
return (ServerConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
return null;
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ServerConfiguration that = (ServerConfiguration) o;
if (connectOnIdeStartup != that.connectOnIdeStartup) return false;
if (!label.equals(that.label)) return false;
if (databaseVendor != that.databaseVendor) return false;
if (!serverUrl.equals(that.serverUrl)) return false;
if (userDatabase != null ? !userDatabase.equals(that.userDatabase) : that.userDatabase != null) return false;
if (shellArgumentsLine != null ? !shellArgumentsLine.equals(that.shellArgumentsLine) : that.shellArgumentsLine != null)
return false;
if (shellWorkingDir != null ? !shellWorkingDir.equals(that.shellWorkingDir) : that.shellWorkingDir != null)
return false;
return !(authenticationSettings != null ? !authenticationSettings.equals(that.authenticationSettings) : that.authenticationSettings != null);
}
@Override
public int hashCode() {
int result = label.hashCode();
result = 31 * result + databaseVendor.hashCode();
result = 31 * result + serverUrl.hashCode();
result = 31 * result + (userDatabase != null ? userDatabase.hashCode() : 0);
result = 31 * result + (connectOnIdeStartup ? 1 : 0);
result = 31 * result + (shellArgumentsLine != null ? shellArgumentsLine.hashCode() : 0);
result = 31 * result + (shellWorkingDir != null ? shellWorkingDir.hashCode() : 0);
result = 31 * result + (authenticationSettings != null ? authenticationSettings.hashCode() : 0);
return result;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/DatabaseUI.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons;
import com.intellij.openapi.project.Project;
import org.codinjutsu.tools.nosql.commons.view.AuthenticationView;
import org.codinjutsu.tools.nosql.commons.view.NoSqlResultView;
import org.codinjutsu.tools.nosql.commons.view.editor.NoSqlDatabaseObjectFile;
public interface DatabaseUI {
AuthenticationView createAythenticationView();
NoSqlResultView createResultPanel(Project project, NoSqlDatabaseObjectFile objectFile);
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/logic/ConfigurationException.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.logic;
public class ConfigurationException extends RuntimeException {
public ConfigurationException(String message) {
super(message);
}
public ConfigurationException(Exception ex) {
super(ex);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/logic/DatabaseClient.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.logic;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import org.codinjutsu.tools.nosql.commons.model.DatabaseServer;
public interface DatabaseClient {
void connect(ServerConfiguration serverConfiguration);
void loadServer(DatabaseServer databaseServer);
void cleanUpServers();
void registerServer(DatabaseServer databaseServer);
ServerConfiguration defaultConfiguration();
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/AuthenticationSettings.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.model;
import java.util.HashMap;
import java.util.Map;
public class AuthenticationSettings {
private String username = null;
private String password = null;
private Map<String, String> extras = new HashMap<>();
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Map<String, String> getExtras() {
return extras;
}
public void setExtras(Map<String, String> extras) {
this.extras = extras;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuthenticationSettings that = (AuthenticationSettings) o;
if (username != null ? !username.equals(that.username) : that.username != null) return false;
if (password != null ? !password.equals(that.password) : that.password != null) return false;
return !(extras != null ? !extras.equals(that.extras) : that.extras != null);
}
@Override
public int hashCode() {
int result = username != null ? username.hashCode() : 0;
result = 31 * result + (password != null ? password.hashCode() : 0);
result = 31 * result + (extras != null ? extras.hashCode() : 0);
return result;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/Database.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.model;
public class Database {
protected final String name;
public Database(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/DatabaseServer.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.model;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import java.util.LinkedList;
import java.util.List;
public class DatabaseServer {
public enum Status {
OK, LOADING, ERROR
}
private List<Database> databases = new LinkedList<Database>();
private final ServerConfiguration configuration;
private Status status = Status.OK;
public DatabaseServer(ServerConfiguration configuration) {
this.configuration = configuration;
}
public String getServerUrl() {
return configuration.getServerUrl();
}
public String getLabel() {
return configuration.getLabel();
}
public void setDatabases(List<Database> databases) {
this.databases = databases;
}
public boolean hasDatabases() {
return !databases.isEmpty();
}
public List<Database> getDatabases() {
return databases;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public ServerConfiguration getConfiguration() {
return configuration;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/style/StyleAttributesProvider.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.style;
import com.intellij.ui.Gray;
import com.intellij.ui.JBColor;
import com.intellij.ui.SimpleTextAttributes;
import java.awt.*;
public class StyleAttributesProvider {
private static final Color LIGNT_GREEN = new JBColor(new Color(0, 128, 0), new Color(165, 194, 97));
private static final Color LIGHT_GRAY = Gray._128;
public static final Color KEY_COLOR = new JBColor(new Color(102, 14, 122), new Color(204, 120, 50));
public static final Color NUMBER_COLOR = JBColor.BLUE;
private static final SimpleTextAttributes INDEX = new SimpleTextAttributes(Font.BOLD, JBColor.BLACK);
private static final SimpleTextAttributes KEY_VALUE = new SimpleTextAttributes(Font.BOLD, KEY_COLOR);
private static final SimpleTextAttributes INTEGER_TEXT_ATTRIBUTE = new SimpleTextAttributes(Font.PLAIN, NUMBER_COLOR);
private static final SimpleTextAttributes BOOLEAN_TEXT_ATTRIBUTE = INTEGER_TEXT_ATTRIBUTE;
private static final SimpleTextAttributes STRING_TEXT_ATTRIBUTE = new SimpleTextAttributes(Font.PLAIN, LIGNT_GREEN);
private static final SimpleTextAttributes NULL_TEXT_ATTRIBUTE = new SimpleTextAttributes(Font.ITALIC, LIGHT_GRAY);
private static final SimpleTextAttributes OBJECT_TEXT_ATTRIBUTE = new SimpleTextAttributes(Font.BOLD, LIGHT_GRAY);
private static final SimpleTextAttributes OBJECT_ID_TEXT_ATTRIBUTE = INTEGER_TEXT_ATTRIBUTE;
public static SimpleTextAttributes getIndexAttribute() {
return INDEX;
}
public static SimpleTextAttributes getKeyValueAttribute() {
return KEY_VALUE;
}
public static SimpleTextAttributes getNumberAttribute() {
return INTEGER_TEXT_ATTRIBUTE;
}
public static SimpleTextAttributes getBooleanAttribute() {
return BOOLEAN_TEXT_ATTRIBUTE;
}
public static SimpleTextAttributes getStringAttribute() {
return STRING_TEXT_ATTRIBUTE;
}
public static SimpleTextAttributes getNullAttribute() {
return NULL_TEXT_ATTRIBUTE;
}
public static SimpleTextAttributes getObjectAttribute() {
return OBJECT_TEXT_ATTRIBUTE;
}
public static SimpleTextAttributes getObjectIdAttribute() {
return OBJECT_ID_TEXT_ATTRIBUTE;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/DateUtils.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.utils;
import java.text.DateFormat;
import java.util.Locale;
import java.util.TimeZone;
public class DateUtils {
public static DateFormat utcDateTime(Locale locale) {
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG, locale);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
return format;
}
public static DateFormat utcTime(Locale locale) {
DateFormat format = DateFormat.getTimeInstance(DateFormat.MEDIUM, locale);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
return format;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/GuiUtils.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.utils;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.util.IconLoader;
import com.intellij.ui.awt.RelativePoint;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.net.URL;
import java.util.Enumeration;
public class GuiUtils {
private static final String ICON_FOLDER = "/icons/";
public static Icon loadIcon(String iconFilename) {
return IconLoader.findIcon(ICON_FOLDER + iconFilename);
}
public static Icon loadIcon(String iconFilename, String darkIconFilename) {
String iconPath = ICON_FOLDER;
if (isUnderDarcula()) {
iconPath += darkIconFilename;
} else {
iconPath += iconFilename;
}
return IconLoader.findIcon(iconPath);
}
public static URL getIconResource(String iconFilename) {
return GuiUtils.class.getResource(ICON_FOLDER + iconFilename);
}
public static void installActionGroupInToolBar(DefaultActionGroup actionGroup, JPanel toolBarPanel, ActionManager actionManager, String toolbarName, boolean horizontal) {
if (actionManager == null) {
return;
}
JComponent actionToolbar = ActionManager.getInstance().createActionToolbar(toolbarName, actionGroup, horizontal).getComponent();
toolBarPanel.add(actionToolbar, BorderLayout.CENTER);
}
public static boolean isUnderDarcula() {
return UIManager.getLookAndFeel().getName().contains("Darcula");
}
public static void runInSwingThread(Runnable runnable) {
ApplicationManager.getApplication().invokeLater(runnable);
}
// Copy from private method com.intellij.util.ui.tree.TreeUtils#expand need to expand specifically some node instead of the whole tree
public static void expand(@NotNull JTree tree, @NotNull TreePath path, int levels) {
if (levels == 0) return;
tree.expandPath(path);
TreeNode node = (TreeNode) path.getLastPathComponent();
Enumeration children = node.children();
while (children.hasMoreElements()) {
expand(tree, path.pathByAddingChild(children.nextElement()), levels - 1);
}
}
public static Dimension enlargeWidth(Dimension preferredSize, double factor) {
int enlargedWidth = new Double(preferredSize.width * factor).intValue();
return new Dimension(enlargedWidth, preferredSize.height);
}
public static void showNotification(final JComponent component, final MessageType info, final String message, final Balloon.Position position) {
runInSwingThread(new Runnable() {
@Override
public void run() {
JBPopupFactory.getInstance().createBalloonBuilder(new JLabel(message))
.setFillColor(info.getPopupBackground())
.createBalloon()
.show(new RelativePoint(component, new Point(0, 0)), position);
}
});
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/StringUtils.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.utils;
public class StringUtils {
private static final String ELLIPSIS = "...";
public static String abbreviateInCenter(String stringToAbbreviate, int length) {
int halfLength = length / 2;
int firstPartLastIndex = halfLength - ELLIPSIS.length();
int stringLength = stringToAbbreviate.length();
return String.format("%s%s%s",
stringToAbbreviate.substring(0, firstPartLastIndex),
ELLIPSIS,
stringToAbbreviate.substring(stringLength - halfLength, stringLength));
}
public static Number parseNumber(String number) {
try {
return Integer.parseInt(number);
} catch (NumberFormatException ex) {
; //UGLY :(
}
try {
return Long.parseLong(number);
} catch (NumberFormatException ex) {
; //UGLY :(
}
return Double.parseDouble(number);
}
public static String[] explode(String key, String separator) {
return org.apache.commons.lang.StringUtils.split(key, separator);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/AuthenticationView.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import org.codinjutsu.tools.nosql.commons.model.AuthenticationSettings;
import javax.swing.*;
public interface AuthenticationView {
JPanel getComponent();
AuthenticationSettings create();
void load(AuthenticationSettings settings);
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ErrorPanel.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import com.intellij.openapi.ui.Messages;
import com.intellij.ui.HoverHyperlinkLabel;
import com.intellij.ui.JBColor;
import com.intellij.ui.components.JBLabel;
import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.*;
public class ErrorPanel extends JPanel {
public ErrorPanel(final Exception ex) {
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
JBLabel comp = new JBLabel("Error during query execution:");
comp.setForeground(JBColor.RED);
add(comp);
final HoverHyperlinkLabel hoverHyperlinkLabel = new HoverHyperlinkLabel("more detail...");
hoverHyperlinkLabel.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
if (hyperlinkEvent.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
Messages.showErrorDialog(ex.toString(), "Error During Query Execution");
}
}
});
add(Box.createRigidArea(new Dimension(10, 10)));
add(hoverHyperlinkLabel);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlResultView.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import com.intellij.openapi.Disposable;
import javax.swing.*;
public abstract class NoSqlResultView<R> extends JPanel implements Disposable {
public abstract void showResults();
public abstract JPanel getResultPanel();
public abstract R getRecords();
public abstract void executeQuery();
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlTreeNode.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import org.codinjutsu.tools.nosql.commons.view.nodedescriptor.NodeDescriptor;
import javax.swing.tree.DefaultMutableTreeNode;
public class NoSqlTreeNode extends DefaultMutableTreeNode {
public NoSqlTreeNode(NodeDescriptor nodeDescriptor) {
setUserObject(nodeDescriptor);
}
public NodeDescriptor getDescriptor() {
return (NodeDescriptor) this.getUserObject();
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanel.form
================================================
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.codinjutsu.tools.nosql.commons.view.ServerConfigurationPanel">
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="10" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="926" height="597"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="3c8c4" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Server url(s):"/>
</properties>
</component>
<vspacer id="79c7c">
<constraints>
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="264eb" class="javax.swing.JTextField" binding="serverUrlField">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties>
<text value=""/>
</properties>
</component>
<grid id="10cf3" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="93de1" class="javax.swing.JButton" binding="testConnectionButton">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Test Connection"/>
</properties>
</component>
<hspacer id="953d2">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
<grid id="5672e" binding="mongoShellOptionsPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="8" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none" title="Mongo shell"/>
<children>
<component id="dc5d9" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Arguments:"/>
</properties>
</component>
<component id="e731d" class="com.intellij.ui.RawCommandLineEditor" binding="shellArgumentsLineField">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="23136" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Working dir:"/>
</properties>
</component>
<component id="d4144" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="shellWorkingDirField" custom-create="true">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="943fb" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font/>
<text value="Note: Do not put url, port, username and password in the above arguments"/>
</properties>
</component>
</children>
</grid>
<component id="63c7f" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Label:"/>
</properties>
</component>
<component id="20aea" class="javax.swing.JTextField" binding="labelField">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="ab51" class="javax.swing.JLabel" binding="databaseTipsLabel">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<font style="2"/>
<text value="format: host:port. If replicat set: host:port1,host:port2,..."/>
</properties>
</component>
<component id="d7fc6" class="javax.swing.JLabel">
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="User Database:"/>
</properties>
</component>
<component id="c9dec" class="javax.swing.JCheckBox" binding="autoConnectCheckBox">
<constraints>
<grid row="7" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<horizontalTextPosition value="11"/>
<text value="Connect on IDE startup"/>
</properties>
</component>
<component id="8afaa" class="javax.swing.JTextField" binding="userDatabaseField">
<constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="90256" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Database Vendor:"/>
</properties>
</component>
<component id="fea84" class="javax.swing.JLabel" binding="databaseVendorLabel">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Label"/>
</properties>
</component>
<grid id="ba0c9" binding="authenticationContainer" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</form>
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanel.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.*;
import com.intellij.openapi.util.Ref;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.RawCommandLineEditor;
import org.apache.commons.lang.StringUtils;
import org.codinjutsu.tools.nosql.DatabaseVendor;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import org.codinjutsu.tools.nosql.commons.logic.ConfigurationException;
import org.codinjutsu.tools.nosql.commons.logic.DatabaseClient;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ServerConfigurationPanel extends JPanel {
private JPanel rootPanel;
private JTextField labelField;
private JPanel authenticationContainer;
private JTextField serverUrlField;
private JTextField userDatabaseField;
private JCheckBox autoConnectCheckBox;
private JButton testConnectionButton;
private JPanel mongoShellOptionsPanel;
private TextFieldWithBrowseButton shellWorkingDirField;
private RawCommandLineEditor shellArgumentsLineField;
private JLabel databaseTipsLabel;
private JLabel databaseVendorLabel;
private final Project project;
private final DatabaseClient databaseClient;
private final DatabaseVendor databaseVendor;
private final AuthenticationView authenticationView;
public ServerConfigurationPanel(Project project,
DatabaseVendor databaseVendor,
DatabaseClient databaseClient,
AuthenticationView authenticationView) {
this.project = project;
this.databaseClient = databaseClient;
this.databaseVendor = databaseVendor;
this.authenticationView = authenticationView;
setLayout(new BorderLayout());
add(rootPanel, BorderLayout.CENTER);
authenticationContainer.add(authenticationView.getComponent());
labelField.setName("labelField");
databaseVendorLabel.setName("databaseVendorLabel");
databaseVendorLabel.setText(databaseVendor.name);
databaseVendorLabel.setIcon(databaseVendor.icon);
databaseTipsLabel.setName("databaseTipsLabel");
databaseTipsLabel.setText(databaseVendor.tips);
serverUrlField.setName("serverUrlField");
authenticationContainer.setBorder(IdeBorderFactory.createTitledBorder("Authentication settings", true));
userDatabaseField.setName("userDatabaseField");
userDatabaseField.setToolTipText("If your access is restricted to a specific database (e.g.: MongoLab), you can set it right here");
autoConnectCheckBox.setName("autoConnectField");
mongoShellOptionsPanel.setBorder(IdeBorderFactory.createTitledBorder("Mongo shell options", true));
shellArgumentsLineField.setDialogCaption("Mongo arguments");
testConnectionButton.setName("testConnection");
shellWorkingDirField.setText(null);
initListeners();
}
private void initListeners() {
testConnectionButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
final Ref<Exception> excRef = new Ref<>();
final ProgressManager progressManager = ProgressManager.getInstance();
progressManager.runProcessWithProgressSynchronously(new Runnable() {
@Override
public void run() {
ServerConfiguration configuration = createServerConfigurationForTesting();
final ProgressIndicator progressIndicator = progressManager.getProgressIndicator();
if (progressIndicator != null) {
progressIndicator.setText("Connecting to " + configuration.getServerUrl());
}
try {
databaseClient.connect(configuration);
} catch (Exception ex) {
excRef.set(ex);
}
}
}, "Testing connection for " + databaseVendor.name, true, ServerConfigurationPanel.this.project);
if (!excRef.isNull()) {
Messages.showErrorDialog(rootPanel, excRef.get().getMessage(), "Connection test failed");
} else {
Messages.showInfoMessage(rootPanel, "Connection test successful for " + databaseVendor.name, "Connection test successful");
}
}
});
}
public void loadConfigurationData(ServerConfiguration configuration) {
labelField.setText(configuration.getLabel());
serverUrlField.setText(configuration.getServerUrl());
userDatabaseField.setText(configuration.getUserDatabase());
shellArgumentsLineField.setText(configuration.getShellArgumentsLine());
shellWorkingDirField.setText(configuration.getShellWorkingDir());
autoConnectCheckBox.setSelected(configuration.isConnectOnIdeStartup());
authenticationView.load(configuration.getAuthenticationSettings());
}
@NotNull
private ServerConfiguration createServerConfigurationForTesting() {
ServerConfiguration configuration = new ServerConfiguration();
configuration.setDatabaseVendor(databaseVendor);
configuration.setServerUrl(getServerUrls());
configuration.setAuthenticationSettings(authenticationView.create());
configuration.setUserDatabase(getUserDatabase());
return configuration;
}
public void applyConfigurationData(ServerConfiguration configuration) {
configuration.setLabel(getLabel());
configuration.setDatabaseVendor(databaseVendor);
configuration.setServerUrl(getServerUrls());
configuration.setAuthenticationSettings(authenticationView.create());
configuration.setUserDatabase(getUserDatabase());
configuration.setShellArgumentsLine(getShellArgumentsLine());
configuration.setShellWorkingDir(getShellWorkingDir());
configuration.setConnectOnIdeStartup(isAutoConnect());
}
public ValidationInfo validateInputs() {
if (StringUtils.isEmpty(getLabel())) {
return new ValidationInfo("Label should be set");
}
String serverUrl = getServerUrls();
if (serverUrl == null) {
return new ValidationInfo("URL(s) should be set");
}
return null;
}
private void validateUrls() {
String serverUrl = getServerUrls();
if (serverUrl == null) {
throw new ConfigurationException("URL(s) should be set");
}
for (String subServerUrl : serverUrl.split(",")) {
String[] host_port = subServerUrl.split(":");
if (host_port.length < 2) {
throw new ConfigurationException(String.format("URL '%s' format is incorrect. It should be 'host:port'", subServerUrl));
}
try {
Integer.valueOf(host_port[1].trim());
} catch (NumberFormatException e) {
throw new ConfigurationException(String.format("Port in the URL '%s' is incorrect. It should be a number", subServerUrl));
}
}
}
private String getLabel() {
String label = labelField.getText();
if (StringUtils.isNotBlank(label)) {
return label;
}
return null;
}
private String getServerUrls() {
String serverUrl = serverUrlField.getText();
if (StringUtils.isNotBlank(serverUrl)) {
return serverUrl;
}
return null;
}
private String getUserDatabase() {
String userDatabase = userDatabaseField.getText();
if (StringUtils.isNotBlank(userDatabase)) {
return userDatabase;
}
return null;
}
private String getShellArgumentsLine() {
String shellArgumentsLine = shellArgumentsLineField.getText();
if (StringUtils.isNotBlank(shellArgumentsLine)) {
return shellArgumentsLine;
}
return null;
}
private String getShellWorkingDir() {
String shellWorkingDir = shellWorkingDirField.getText();
if (StringUtils.isNotBlank(shellWorkingDir)) {
return shellWorkingDir;
}
return null;
}
private boolean isAutoConnect() {
return autoConnectCheckBox.isSelected();
}
private void createUIComponents() {
shellWorkingDirField = new TextFieldWithBrowseButton();
FileChooserDescriptor fileChooserDescriptor = new FileChooserDescriptor(false, true, false, false, false, false);
ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> browseFolderActionListener =
new ComponentWithBrowseButton.BrowseFolderActionListener<>("Shell working directory",
null,
shellWorkingDirField,
null,
fileChooserDescriptor,
TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);
shellWorkingDirField.addBrowseFolderListener(null, browseFolderActionListener, false);
shellWorkingDirField.setName("shellWorkingDirField");
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanelFactory.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view;
import com.intellij.openapi.project.Project;
import org.codinjutsu.tools.nosql.DatabaseVendor;
import org.codinjutsu.tools.nosql.DatabaseVendorClientManager;
import org.codinjutsu.tools.nosql.DatabaseVendorUIManager;
public class ServerConfigurationPanelFactory {
private final Project project;
private final DatabaseVendorClientManager databaseVendorClientManager;
private final DatabaseVendorUIManager databaseVendorUIManager;
public ServerConfigurationPanelFactory(Project project,
DatabaseVendorClientManager databaseVendorClientManager,
DatabaseVendorUIManager databaseVendorUIManager) {
this.project = project;
this.databaseVendorClientManager = databaseVendorClientManager;
this.databaseVendorUIManager = databaseVendorUIManager;
}
public ServerConfigurationPanel create(DatabaseVendor databaseVendor) {
return new ServerConfigurationPanel(
this.project,
databaseVendor,
databaseVendorClientManager.get(databaseVendor),
databaseVendorUIManager.get(databaseVendor).createAythenticationView()
);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ExecuteQuery.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.codinjutsu.tools.nosql.commons.view.NoSqlResultView;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
public class ExecuteQuery<G extends NoSqlResultView> extends AnAction {
private final G resultView;
public ExecuteQuery(G resultView) {
super("Execute query", "Execute query with options", AllIcons.Actions.Execute);
this.resultView = resultView;
registerCustomShortcutSet(KeyEvent.VK_ENTER, InputEvent.CTRL_MASK, resultView);
}
@Override
public void actionPerformed(AnActionEvent anActionEvent) {
resultView.executeQuery();
}
@Override
public void update(AnActionEvent event) {
event.getPresentation().setEnabled(resultView.getRecords() != null);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/NoSqlDatabaseConsoleAction.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.action;
import com.intellij.execution.ExecutionException;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import org.apache.commons.lang.StringUtils;
import org.codinjutsu.tools.nosql.DatabaseVendor;
import org.codinjutsu.tools.nosql.NoSqlConfiguration;
import org.codinjutsu.tools.nosql.NoSqlExplorerPanel;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import org.codinjutsu.tools.nosql.mongo.view.console.MongoConsoleRunner;
import org.codinjutsu.tools.nosql.redis.view.console.RedisConsoleRunner;
public class NoSqlDatabaseConsoleAction extends AnAction implements DumbAware {
private final NoSqlExplorerPanel noSqlExplorerPanel;
public NoSqlDatabaseConsoleAction(NoSqlExplorerPanel noSqlExplorerPanel) {
super("DB Shell...", "DB Shell", GuiUtils.loadIcon("toolConsole.png"));
this.noSqlExplorerPanel = noSqlExplorerPanel;
}
@Override
public void update(AnActionEvent e) {
final Project project = e.getData(PlatformDataKeys.PROJECT);
boolean enabled = project != null;
if (!enabled) {
return;
}
NoSqlConfiguration configuration = NoSqlConfiguration.getInstance(project);
e.getPresentation().setVisible(
configuration != null &&
(StringUtils.isNotBlank(configuration.getShellPath(DatabaseVendor.MONGO)) ||
StringUtils.isNotBlank(configuration.getShellPath(DatabaseVendor.REDIS))
) &&
noSqlExplorerPanel.getConfiguration() != null &&
noSqlExplorerPanel.getConfiguration().isSingleServer()
);
e.getPresentation().setEnabled(
noSqlExplorerPanel.getSelectedMongoDatabase() != null ||
noSqlExplorerPanel.getSelectedRedisDatabase() != null
);
}
@Override
public void actionPerformed(AnActionEvent e) {
final Project project = e.getData(PlatformDataKeys.PROJECT);
assert project != null;
runShell(project);
}
private void runShell(Project project) {
ServerConfiguration configuration = noSqlExplorerPanel.getConfiguration();
if (DatabaseVendor.MONGO.equals(configuration.getDatabaseVendor())) {
MongoConsoleRunner consoleRunner = new MongoConsoleRunner(project, configuration, noSqlExplorerPanel.getSelectedMongoDatabase());
try {
consoleRunner.initAndRun();
} catch (ExecutionException e1) {
throw new RuntimeException(e1);
}
} else if (DatabaseVendor.REDIS.equals(configuration.getDatabaseVendor())) {
RedisConsoleRunner consoleRunner = new RedisConsoleRunner(project, configuration, noSqlExplorerPanel.getSelectedRedisDatabase());
try {
consoleRunner.initAndRun();
} catch (ExecutionException e1) {
throw new RuntimeException(e1);
}
}
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/OpenPluginSettingsAction.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.options.ShowSettingsUtil;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
public class OpenPluginSettingsAction extends AnAction implements DumbAware {
public OpenPluginSettingsAction() {
super("NoSql Settings", "Edit the NoSql settings for the current project", AllIcons.General.Settings);
}
@Override
public void actionPerformed(AnActionEvent event) {
showSettingsFor(getProject(event));
}
private static void showSettingsFor(Project project) {
ShowSettingsUtil.getInstance().showSettingsDialog(project, "NoSql Servers");
}
private static Project getProject(AnActionEvent event) {
DataContext dataContext = event.getDataContext();
return PlatformDataKeys.PROJECT.getData(dataContext);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/RefreshServerAction.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
import org.codinjutsu.tools.nosql.NoSqlExplorerPanel;
import org.codinjutsu.tools.nosql.commons.utils.GuiUtils;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
public class RefreshServerAction extends AnAction implements DumbAware {
private static final Icon CONNECT_ICON = GuiUtils.loadIcon("connector.png", "connector_dark.png");
private static final Icon REFRESH_ICON = AllIcons.Actions.Refresh;
private static final String REFRESH_TEXT = "Refresh this server";
private static final String CONNECT_TEXT = "Connect to this server";
private final NoSqlExplorerPanel noSqlExplorerPanel;
public RefreshServerAction(NoSqlExplorerPanel noSqlExplorerPanel) {
super(REFRESH_TEXT);
this.noSqlExplorerPanel = noSqlExplorerPanel;
}
@Override
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
noSqlExplorerPanel.reloadServerConfiguration(noSqlExplorerPanel.getSelectedServerNode(), true);
}
@Override
public void update(@NotNull AnActionEvent event) {
DefaultMutableTreeNode selectedServerNode = noSqlExplorerPanel.getSelectedServerNode();
event.getPresentation().setVisible(selectedServerNode != null);
if (selectedServerNode == null) {
return;
}
boolean isConnected = selectedServerNode.getChildCount() > 0;
event.getPresentation().setIcon(isConnected ? REFRESH_ICON : CONNECT_ICON);
event.getPresentation().setText(isConnected ? REFRESH_TEXT : CONNECT_TEXT);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ViewCollectionValuesAction.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
import org.codinjutsu.tools.nosql.NoSqlExplorerPanel;
import javax.swing.*;
public class ViewCollectionValuesAction extends AnAction implements DumbAware {
private static Icon ICON = AllIcons.Nodes.DataSchema;
private final NoSqlExplorerPanel noSqlExplorerPanel;
public ViewCollectionValuesAction(NoSqlExplorerPanel noSqlExplorerPanel) {
super("View collection content", "View collection content", ICON);
this.noSqlExplorerPanel = noSqlExplorerPanel;
}
@Override
public void actionPerformed(AnActionEvent anActionEvent) {
noSqlExplorerPanel.loadRecords();
}
public void update(AnActionEvent event) {
event.getPresentation().setVisible(noSqlExplorerPanel.getSelectedCollection() != null
|| noSqlExplorerPanel.getSelectedRedisDatabase() != null
|| noSqlExplorerPanel.getSelectedCouchaseDatabase() != null);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/console/NoSqlConsoleView.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.console;
import com.intellij.execution.console.LanguageConsoleImpl;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.Project;
import org.codinjutsu.tools.nosql.ServerConfiguration;
public class NoSqlConsoleView extends LanguageConsoleImpl {
public NoSqlConsoleView(Project project, String title, ServerConfiguration configuration) {
super(project, title, StdFileTypes.PLAIN_TEXT.getLanguage());
setPrompt(String.format("%s> ", configuration.getServerUrl()));
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditor.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.editor;
import com.intellij.codeHighlighting.BackgroundEditorHighlighter;
import com.intellij.ide.structureView.StructureViewBuilder;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.FileEditorLocation;
import com.intellij.openapi.fileEditor.FileEditorState;
import com.intellij.openapi.fileEditor.FileEditorStateLevel;
import com.intellij.openapi.util.UserDataHolderBase;
import org.codinjutsu.tools.nosql.commons.view.NoSqlResultView;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.beans.PropertyChangeListener;
public class NoSqlDatabaseDataEditor extends UserDataHolderBase implements FileEditor {
private NoSqlResultView panel;
private boolean disposed;
public NoSqlDatabaseDataEditor(NoSqlResultView noSqlResultView) {
panel = noSqlResultView;
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
panel.showResults();
}
});
}
@NotNull
@Override
public JComponent getComponent() {
return isDisposed() ? new JPanel() : panel;
}
@Nullable
@Override
public JComponent getPreferredFocusedComponent() {
return panel == null ? null : panel.getResultPanel();
}
@NotNull
@Override
public String getName() {
return "NoSql Data";
}
@Override
public void dispose() {
if (!disposed) {
panel.dispose();
panel = null;
disposed = true;
}
}
public boolean isDisposed() {
return disposed;
}
@NotNull
@Override
public FileEditorState getState(@NotNull FileEditorStateLevel level) {
return FileEditorState.INSTANCE;
}
// Unused methods
@Override
public void setState(@NotNull FileEditorState state) {
}
@Override
public boolean isModified() {
return false;
}
@Override
public boolean isValid() {
return true;
}
@Override
public void selectNotify() {
}
@Override
public void deselectNotify() {
}
@Override
public void addPropertyChangeListener(@NotNull PropertyChangeListener listener) {
}
@Override
public void removePropertyChangeListener(@NotNull PropertyChangeListener listener) {
}
@Nullable
@Override
public BackgroundEditorHighlighter getBackgroundHighlighter() {
return null;
}
@Nullable
@Override
public FileEditorLocation getCurrentLocation() {
return null;
}
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder() {
return null;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditorProvider.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.editor;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.FileEditorPolicy;
import com.intellij.openapi.fileEditor.FileEditorProvider;
import com.intellij.openapi.fileEditor.FileEditorState;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import org.codinjutsu.tools.nosql.DatabaseVendorUIManager;
import org.codinjutsu.tools.nosql.commons.DatabaseUI;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
public class NoSqlDatabaseDataEditorProvider implements FileEditorProvider, ApplicationComponent, DumbAware {
@Override
public boolean accept(@NotNull Project project, @NotNull VirtualFile file) {
return DatabaseVendorUIManager.getInstance(project).accept(file);
}
@NotNull
@Override
public FileEditor createEditor(@NotNull Project project, @NotNull VirtualFile file) {
NoSqlDatabaseObjectFile objectFile = (NoSqlDatabaseObjectFile) file;
DatabaseUI databaseUI = DatabaseVendorUIManager.getInstance(project).get(objectFile.getConfiguration().getDatabaseVendor());
if (databaseUI == null) {
throw new IllegalStateException("Unsupported file");
}
return new NoSqlDatabaseDataEditor(databaseUI.createResultPanel(project, objectFile));
}
@Override
public void disposeEditor(@NotNull FileEditor editor) {
editor.dispose();
}
@Override
public void initComponent() {
}
@Override
public void disposeComponent() {
}
@NotNull
@Override
public FileEditorState readState(@NotNull Element sourceElement, @NotNull Project project, @NotNull VirtualFile file) {
return FileEditorState.INSTANCE;
}
@Override
public void writeState(@NotNull FileEditorState state, @NotNull Project project, @NotNull Element targetElement) {
}
@NotNull
@Override
public String getEditorTypeId() {
return "NoSqlData";
}
@NotNull
@Override
public FileEditorPolicy getPolicy() {
return FileEditorPolicy.HIDE_DEFAULT_EDITOR;
}
@NotNull
@Override
public String getComponentName() {
return "NoSqlPlugin.NoSqlEditorProvider";
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseFileSystem.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.editor;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileListener;
import com.intellij.openapi.vfs.VirtualFileSystem;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
public class NoSqlDatabaseFileSystem extends VirtualFileSystem implements ApplicationComponent {
private static final String PROTOCOL = "nosql";
public static NoSqlDatabaseFileSystem getInstance() {
return ApplicationManager.getApplication().getComponent(NoSqlDatabaseFileSystem.class);
}
@NotNull
@Override
public String getComponentName() {
return "NoSqlPlugin.NoSqlDatabaseFileSystem";
}
@NotNull
@Override
public String getProtocol() {
return PROTOCOL;
}
@Override
public void initComponent() {
}
@Override
public void disposeComponent() {
}
public void openEditor(final NoSqlDatabaseObjectFile databaseObjectFile) {
FileEditorManager fileEditorManager = FileEditorManager.getInstance(databaseObjectFile.getProject());
fileEditorManager.openFile(databaseObjectFile, true);
}
// Unused methods
@Nullable
@Override
public VirtualFile findFileByPath(@NotNull @NonNls String path) {
return null;
}
@Override
public void refresh(boolean asynchronous) {
}
@Nullable
@Override
public VirtualFile refreshAndFindFileByPath(@NotNull String path) {
return null;
}
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener listener) {
}
@Override
public void removeVirtualFileListener(@NotNull VirtualFileListener listener) {
}
@Override
protected void deleteFile(Object requestor, @NotNull VirtualFile vFile) throws IOException {
}
@Override
protected void moveFile(Object requestor, @NotNull VirtualFile vFile, @NotNull VirtualFile newParent) throws IOException {
}
@Override
protected void renameFile(Object requestor, @NotNull VirtualFile vFile, @NotNull String newName) throws IOException {
}
@Override
protected VirtualFile createChildFile(Object requestor, @NotNull VirtualFile vDir, @NotNull String fileName) throws IOException {
return null;
}
@NotNull
@Override
protected VirtualFile createChildDirectory(Object requestor, @NotNull VirtualFile vDir, @NotNull String dirName) throws IOException {
throw new UnsupportedOperationException("No file management in this plugin");
}
@Override
protected VirtualFile copyFile(Object requestor, @NotNull VirtualFile virtualFile, @NotNull VirtualFile newParent, @NotNull String copyName) throws IOException {
return null;
}
@Override
public boolean isReadOnly() {
return false;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseObjectFile.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileSystem;
import com.intellij.util.LocalTimeCounter;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public abstract class NoSqlDatabaseObjectFile extends VirtualFile {
private final Project project;
private final ServerConfiguration configuration;
private final String name;
private final long myModStamp;
protected NoSqlDatabaseObjectFile(Project project, ServerConfiguration configuration, String name) {
this.project = project;
this.configuration = configuration;
this.name = name;
this.myModStamp = LocalTimeCounter.currentTime();
}
@NotNull
@Override
public String getName() {
return name;
}
@NotNull
@Override
public VirtualFileSystem getFileSystem() {
return NoSqlDatabaseFileSystem.getInstance();
}
@NotNull
@Override
public String getPath() {
return name;
}
@Override
public boolean isValid() {
return true;
}
@Override
public boolean isWritable() {
return false;
}
@Override
public boolean isDirectory() {
return false;
}
public ServerConfiguration getConfiguration() {
return configuration;
}
public Project getProject() {
return project;
}
// Unused methods
@Override
public VirtualFile getParent() {
return null;
}
@Override
public VirtualFile[] getChildren() {
return new VirtualFile[0];
}
@NotNull
@Override
public OutputStream getOutputStream(Object requestor, long newModificationStamp, long newTimeStamp) throws IOException {
throw new UnsupportedOperationException("NoSqlResultFile is read-only");
}
@Override
public long getModificationStamp() {
return myModStamp;
}
@NotNull
@Override
public byte[] contentsToByteArray() throws IOException {
return new byte[0];
}
@Override
public long getTimeStamp() {
return 0;
}
@Override
public long getLength() {
return 0;
}
@Override
public void refresh(boolean asynchronous, boolean recursive, @Nullable Runnable postRunnable) {
}
@Override
public InputStream getInputStream() throws IOException {
return null;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/nodedescriptor/NodeDescriptor.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.nodedescriptor;
import com.intellij.ui.ColoredTableCellRenderer;
import com.intellij.ui.ColoredTreeCellRenderer;
public interface NodeDescriptor {
int MAX_LENGTH = 150;
void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded);
void renderNode(ColoredTreeCellRenderer cellRenderer);
String getFormattedKey();
String getFormattedValue();
Object getValue();
void setValue(Object value);
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/KeyCellRenderer.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.renderer;
import com.intellij.ui.ColoredTreeCellRenderer;
import org.codinjutsu.tools.nosql.commons.view.NoSqlTreeNode;
import org.codinjutsu.tools.nosql.commons.view.nodedescriptor.NodeDescriptor;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
public class KeyCellRenderer extends ColoredTreeCellRenderer {
@Override
public void customizeCellRenderer(@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
NodeDescriptor descriptor = ((NoSqlTreeNode) value).getDescriptor();
descriptor.renderNode(this);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/ValueCellRenderer.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.renderer;
import com.intellij.ui.ColoredTableCellRenderer;
import com.intellij.ui.treeStructure.treetable.TreeTable;
import com.intellij.ui.treeStructure.treetable.TreeTableTree;
import org.codinjutsu.tools.nosql.commons.view.NoSqlTreeNode;
import javax.swing.*;
import javax.swing.tree.TreePath;
public class ValueCellRenderer extends ColoredTableCellRenderer {
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
TreeTableTree tree = ((TreeTable) table).getTree();
TreePath pathForRow = tree.getPathForRow(row);
final NoSqlTreeNode node = (NoSqlTreeNode) pathForRow.getLastPathComponent();
node.getDescriptor().renderValue(this, tree.isExpanded(pathForRow));
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/table/CellEditor.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.commons.view.table;
import com.intellij.ui.treeStructure.treetable.TreeTable;
import org.codinjutsu.tools.nosql.commons.view.NoSqlTreeNode;
import javax.swing.*;
import java.awt.*;
public class CellEditor extends DefaultCellEditor {
public CellEditor() {
super(new JTextField());
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
JTextField stringEditor = (JTextField) getComponent();
final NoSqlTreeNode jsonNode = (NoSqlTreeNode) ((TreeTable) table).getTree().
getPathForRow(row).getLastPathComponent();
stringEditor.setText(String.valueOf(jsonNode.getDescriptor().getValue()));
return stringEditor;
}
@Override
public Object getCellEditorValue() {
return ((JTextField) getComponent()).getText();
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/table/DateTimePicker.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This is licensed under LGPL. License can be found here: http://www.gnu.org/licenses/lgpl-3.0.txt
* <p/>
* This is provided as is. If you have questions please direct them to charlie.hubbard at gmail dot you know what.
*/
package org.codinjutsu.tools.nosql.commons.view.table;
import com.intellij.ui.JBColor;
import com.intellij.util.ui.UIUtil;
import org.codinjutsu.tools.nosql.commons.style.StyleAttributesProvider;
import org.codinjutsu.tools.nosql.commons.utils.DateUtils;
import org.jdesktop.swingx.JXDatePicker;
import org.jdesktop.swingx.JXMonthView;
import org.jdesktop.swingx.calendar.SingleDaySelectionModel;
import javax.swing.*;
import javax.swing.text.DateFormatter;
import javax.swing.text.DefaultFormatterFactory;
import java.awt.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.*;
public class DateTimePicker extends JXDatePicker {
private static Color backgroundColor = JBColor.background();
private static Color foregroundColor = JBColor.foreground();
private static Color selectionBackgroundColor = UIUtil.getTableSelectionBackground();
private static Color selectionForegroundColor = UIUtil.getTableSelectionForeground();
private static Color monthForegroundColor = StyleAttributesProvider.NUMBER_COLOR;
private static Color dayOfTheWeekForegroundColor = StyleAttributesProvider.KEY_COLOR;
private static Color todayBackgroundColor = JBColor.WHITE;
private JSpinner timeSpinner;
private JPanel timePanel;
private DateFormat timeFormat;
public static DateTimePicker create() {
DateTimePicker dateTimePicker = new DateTimePicker();
dateTimePicker.setFormats(DateUtils.utcDateTime(Locale.getDefault()));
dateTimePicker.setTimeFormat(DateUtils.utcTime(Locale.getDefault()));
dateTimePicker.setTimeZone(TimeZone.getTimeZone("UTC"));
dateTimePicker.applyUIStyle();
return dateTimePicker;
}
private DateTimePicker() {
super(null, Locale.getDefault());
getMonthView().setSelectionModel(new SingleDaySelectionModel());
}
public void commitEdit() throws ParseException {
commitTime();
super.commitEdit();
}
public void cancelEdit() {
super.cancelEdit();
setTimeSpinners();
}
@Override
public JPanel getLinkPanel() {
super.getLinkPanel();
if (timePanel == null) {
timePanel = createTimePanel();
}
setTimeSpinners();
return timePanel;
}
@Override
public Date getDate() {
return super.getDate();
}
private JPanel createTimePanel() {
JPanel newPanel = new JPanel();
newPanel.setLayout(new FlowLayout());
SpinnerDateModel dateModel = new SpinnerDateModel();
timeSpinner = new JSpinner(dateModel);
if (timeFormat == null) timeFormat = DateFormat.getTimeInstance(DateFormat.SHORT);
updateTextFieldFormat();
newPanel.add(timeSpinner);
return newPanel;
}
private void updateTextFieldFormat() {
if (timeSpinner == null) return;
JFormattedTextField tf = ((JSpinner.DefaultEditor) timeSpinner.getEditor()).getTextField();
DefaultFormatterFactory factory = (DefaultFormatterFactory) tf.getFormatterFactory();
DateFormatter formatter = (DateFormatter) factory.getDefaultFormatter();
// Change the date format to only show the hours
formatter.setFormat(timeFormat);
}
private void commitTime() {
Date date = getDate();
if (date != null) {
Date time = (Date) timeSpinner.getValue();
GregorianCalendar timeCalendar = new GregorianCalendar();
timeCalendar.setTime(time);
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY));
calendar.set(Calendar.MINUTE, timeCalendar.get(Calendar.MINUTE));
calendar.set(Calendar.SECOND, timeCalendar.get(Calendar.SECOND));
calendar.set(Calendar.MILLISECOND, 0);
Date newDate = calendar.getTime();
setDate(newDate);
}
}
private void setTimeSpinners() {
Date date = getDate();
if (date != null) {
timeSpinner.setValue(date);
}
}
public void setTimeFormat(DateFormat timeFormat) {
this.timeFormat = timeFormat;
updateTextFieldFormat();
}
private void applyUIStyle() {
JXMonthView monthView = getMonthView();
monthView.setMonthStringBackground(backgroundColor);
monthView.setMonthStringForeground(monthForegroundColor);
monthView.setSelectionBackground(selectionBackgroundColor);
monthView.setSelectionForeground(selectionForegroundColor);
monthView.setDaysOfTheWeekForeground(dayOfTheWeekForegroundColor);
monthView.setBackground(backgroundColor);
monthView.setForeground(foregroundColor);
monthView.setTodayBackground(todayBackgroundColor);
getLinkPanel().setBackground(backgroundColor);
getLinkPanel().setForeground(foregroundColor);
}
public static void main(String[] args) {
String[] ids = TimeZone.getAvailableIDs();
for (String id : ids) {
if (!id.startsWith("Etc")) {
TimeZone zone = TimeZone.getTimeZone(id);
int offset = zone.getRawOffset() / 1000;
int hour = offset / 3600;
int minutes = (offset % 3600) / 60;
System.out.println(String.format("(GMT%+d:%02d) %s", hour, minutes, id));
}
}
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/CouchbaseUI.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.couchbase;
import com.intellij.openapi.project.Project;
import org.codinjutsu.tools.nosql.commons.DatabaseUI;
import org.codinjutsu.tools.nosql.commons.view.AuthenticationView;
import org.codinjutsu.tools.nosql.commons.view.NoSqlResultView;
import org.codinjutsu.tools.nosql.commons.view.editor.NoSqlDatabaseObjectFile;
import org.codinjutsu.tools.nosql.couchbase.logic.CouchbaseClient;
import org.codinjutsu.tools.nosql.couchbase.view.CouchbaseAuthenticationPanel;
import org.codinjutsu.tools.nosql.couchbase.view.CouchbasePanel;
import org.codinjutsu.tools.nosql.couchbase.view.editor.CouchbaseObjectFile;
public class CouchbaseUI implements DatabaseUI {
@Override
public AuthenticationView createAythenticationView() {
return new CouchbaseAuthenticationPanel();
}
@Override
public NoSqlResultView createResultPanel(Project project, NoSqlDatabaseObjectFile objectFile) {
CouchbaseObjectFile couchbaseObjectFile = (CouchbaseObjectFile) objectFile;
return new CouchbasePanel(project, CouchbaseClient.getInstance(project), couchbaseObjectFile.getConfiguration(), couchbaseObjectFile.getDatabase());
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/logic/CouchbaseClient.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.couchbase.logic;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.ConnectionString;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.cluster.BucketSettings;
import com.couchbase.client.java.cluster.ClusterManager;
import com.couchbase.client.java.document.json.JsonObject;
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
import com.couchbase.client.java.query.N1qlQuery;
import com.couchbase.client.java.query.N1qlQueryResult;
import com.couchbase.client.java.query.N1qlQueryRow;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.codinjutsu.tools.nosql.DatabaseVendor;
import org.codinjutsu.tools.nosql.ServerConfiguration;
import org.codinjutsu.tools.nosql.commons.logic.ConfigurationException;
import org.codinjutsu.tools.nosql.commons.logic.DatabaseClient;
import org.codinjutsu.tools.nosql.commons.model.AuthenticationSettings;
import org.codinjutsu.tools.nosql.commons.model.Database;
import org.codinjutsu.tools.nosql.commons.model.DatabaseServer;
import org.codinjutsu.tools.nosql.couchbase.model.CouchbaseDatabase;
import org.codinjutsu.tools.nosql.couchbase.model.CouchbaseQuery;
import org.codinjutsu.tools.nosql.couchbase.model.CouchbaseResult;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static com.couchbase.client.java.query.Select.select;
import static com.couchbase.client.java.query.dsl.Expression.i;
public class CouchbaseClient implements DatabaseClient {
public static CouchbaseClient getInstance(Project project) {
return ServiceManager.getService(project, CouchbaseClient.class);
}
@Override
public void connect(ServerConfiguration serverConfiguration) {
CouchbaseCluster cluster = CouchbaseCluster.create(serverConfiguration.getServerUrl());
String userDatabase = serverConfiguration.getUserDatabase();
Bucket bucket = null;
try {
if (StringUtils.isEmpty(userDatabase)) {
bucket = cluster.openBucket();
} else {
bucket = cluster.openBucket(userDatabase);
}
} catch (Exception ex) {
throw new ConfigurationException(ex);
} finally {
if (bucket != null) {
bucket.close();
}
cluster.disconnect();
}
}
@Override
public void loadServer(DatabaseServer databaseServer) {
Cluster cluster = CouchbaseCluster.create(databaseServer.getConfiguration().getServerUrl());
AuthenticationSettings authenticationSettings = databaseServer.getConfiguration().getAuthenticationSettings();
ClusterManager clusterManager = cluster.clusterManager(authenticationSettings.getUsername(), authenticationSettings.getPassword());
List<Database> couchbaseDatabases = new LinkedList<>();
String userBucket = databaseServer.getConfiguration().getUserDatabase();
if (StringUtils.isNotBlank(userBucket)) {
BucketSettings bucketSettings = clusterManager.getBucket(userBucket);
couchbaseDatabases.add(new CouchbaseDatabase(bucketSettings.name()));
} else {
List<BucketSettings> buckets = clusterManager.getBuckets();
for (BucketSettings bucketSettings : buckets) {
CouchbaseDatabase database = new CouchbaseDatabase(bucketSettings.name());
couchbaseDatabases.add(database);
}
}
databaseServer.setDatabases(couchbaseDatabases);
cluster.disconnect();
}
@Override
public void cleanUpServers() {
}
@Override
public void registerServer(DatabaseServer databaseServer) {
}
@Override
public ServerConfiguration defaultConfiguration() {
ServerConfiguration configuration = new ServerConfiguration();
configuration.setDatabaseVendor(DatabaseVendor.COUCHBASE);
configuration.setServerUrl("localhost");
configuration.setAuthenticationSettings(new AuthenticationSettings());
return configuration;
}
public CouchbaseResult loadRecords(ServerConfiguration configuration, CouchbaseDatabase database, CouchbaseQuery couchbaseQuery) {
Cluster cluster = CouchbaseCluster.create(DefaultCouchbaseEnvironment
.builder()
.queryEnabled(true)
.build(),
configuration.getServerUrl());
// AuthenticationSettings authenticationSettings = configuration.getAuthenticationSettings();
// ClusterManager clusterManager = cluster.clusterManager(authenticationSettings.getUsername(), authenticationSettings.getPassword());
Bucket beerBucket = cluster.openBucket(database.getName(), 10, TimeUnit.SECONDS);
N1qlQueryResult queryResult = beerBucket.query(N1qlQuery.simple(select("*").from(i(database.getName())).limit(couchbaseQuery.getLimit())));
//TODO dirty zone :(
CouchbaseResult result = new CouchbaseResult(database.getName());
List<JsonObject> errors = queryResult.errors();
if (!errors.isEmpty()) {
cluster.disconnect();
result.addErrors(errors);
return result;
}
for (N1qlQueryRow row : queryResult.allRows()) {
result.add(row.value());
}
cluster.disconnect();
return result;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseDatabase.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.couchbase.model;
import org.codinjutsu.tools.nosql.commons.model.Database;
public class CouchbaseDatabase extends Database {
public CouchbaseDatabase(String name) {
super(name);
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseQuery.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.couchbase.model;
public class CouchbaseQuery {
private final int limit;
public CouchbaseQuery(int limit) {
this.limit = limit;
}
public int getLimit() {
return limit;
}
}
================================================
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseResult.java
================================================
/*
* Copyright (c) 2015 David Boissier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codinjutsu.tools.nosql.couchbase.model;
import com.couchbase.client.java.document.json.JsonObject;
import java.util.LinkedList;
import java.util.List;
public class CouchbaseResult {
private final List<JsonObject> jsonObjects = new LinkedList<>();
private final List<JsonObject> errors = new LinkedList<>();
private final String name;
public CouchbaseResult(String name) {
this.name = name;
}
public void add(JsonObject jsonObject) {
this.jsonObjects.add(jsonObject);
gitextract_ngp6_0ag/
├── .gitignore
├── CHANGELOG.txt
├── LICENSE.txt
├── README.md
├── fetchIdea.sh
├── nosql4idea.iml.template
├── pom.xml
└── src/
├── main/
│ ├── java/
│ │ └── org/
│ │ └── codinjutsu/
│ │ └── tools/
│ │ └── nosql/
│ │ ├── ConfigurationDialog.java
│ │ ├── DatabaseVendor.java
│ │ ├── DatabaseVendorClientManager.java
│ │ ├── DatabaseVendorUIManager.java
│ │ ├── NoSqlComponent.java
│ │ ├── NoSqlConfigurable.java
│ │ ├── NoSqlConfiguration.java
│ │ ├── NoSqlExplorerPanel.form
│ │ ├── NoSqlExplorerPanel.java
│ │ ├── NoSqlServerTableModel.java
│ │ ├── NoSqlTreeRenderer.java
│ │ ├── NoSqlWindowManager.java
│ │ ├── SelectDatabaseVendorDialog.form
│ │ ├── SelectDatabaseVendorDialog.java
│ │ ├── ServerConfiguration.java
│ │ ├── commons/
│ │ │ ├── DatabaseUI.java
│ │ │ ├── logic/
│ │ │ │ ├── ConfigurationException.java
│ │ │ │ └── DatabaseClient.java
│ │ │ ├── model/
│ │ │ │ ├── AuthenticationSettings.java
│ │ │ │ ├── Database.java
│ │ │ │ └── DatabaseServer.java
│ │ │ ├── style/
│ │ │ │ └── StyleAttributesProvider.java
│ │ │ ├── utils/
│ │ │ │ ├── DateUtils.java
│ │ │ │ ├── GuiUtils.java
│ │ │ │ └── StringUtils.java
│ │ │ └── view/
│ │ │ ├── AuthenticationView.java
│ │ │ ├── ErrorPanel.java
│ │ │ ├── NoSqlResultView.java
│ │ │ ├── NoSqlTreeNode.java
│ │ │ ├── ServerConfigurationPanel.form
│ │ │ ├── ServerConfigurationPanel.java
│ │ │ ├── ServerConfigurationPanelFactory.java
│ │ │ ├── action/
│ │ │ │ ├── ExecuteQuery.java
│ │ │ │ ├── NoSqlDatabaseConsoleAction.java
│ │ │ │ ├── OpenPluginSettingsAction.java
│ │ │ │ ├── RefreshServerAction.java
│ │ │ │ └── ViewCollectionValuesAction.java
│ │ │ ├── console/
│ │ │ │ └── NoSqlConsoleView.java
│ │ │ ├── editor/
│ │ │ │ ├── NoSqlDatabaseDataEditor.java
│ │ │ │ ├── NoSqlDatabaseDataEditorProvider.java
│ │ │ │ ├── NoSqlDatabaseFileSystem.java
│ │ │ │ └── NoSqlDatabaseObjectFile.java
│ │ │ ├── nodedescriptor/
│ │ │ │ └── NodeDescriptor.java
│ │ │ ├── renderer/
│ │ │ │ ├── KeyCellRenderer.java
│ │ │ │ └── ValueCellRenderer.java
│ │ │ └── table/
│ │ │ ├── CellEditor.java
│ │ │ └── DateTimePicker.java
│ │ ├── couchbase/
│ │ │ ├── CouchbaseUI.java
│ │ │ ├── logic/
│ │ │ │ └── CouchbaseClient.java
│ │ │ ├── model/
│ │ │ │ ├── CouchbaseDatabase.java
│ │ │ │ ├── CouchbaseQuery.java
│ │ │ │ └── CouchbaseResult.java
│ │ │ └── view/
│ │ │ ├── CouchbaseAuthenticationPanel.java
│ │ │ ├── CouchbasePanel.form
│ │ │ ├── CouchbasePanel.java
│ │ │ ├── CouchbaseTreeModel.java
│ │ │ ├── couchbaseAuthenticationPanel.form
│ │ │ ├── editor/
│ │ │ │ ├── CouchbaseFakeFileType.java
│ │ │ │ └── CouchbaseObjectFile.java
│ │ │ └── nodedescriptor/
│ │ │ ├── CouchbaseKeyValueDescriptor.java
│ │ │ ├── CouchbaseResultDescriptor.java
│ │ │ └── CouchbaseValueDescriptor.java
│ │ ├── mongo/
│ │ │ ├── MongoUI.java
│ │ │ ├── MongoUtils.java
│ │ │ ├── logic/
│ │ │ │ ├── MongoClient.java
│ │ │ │ ├── MongoClientURIBuilder.java
│ │ │ │ ├── MongoConnectionException.java
│ │ │ │ └── MongoExtraSettings.java
│ │ │ ├── model/
│ │ │ │ ├── JsonDataType.java
│ │ │ │ ├── MongoAggregateOperator.java
│ │ │ │ ├── MongoCollection.java
│ │ │ │ ├── MongoDatabase.java
│ │ │ │ ├── MongoQueryOptions.java
│ │ │ │ ├── MongoResult.java
│ │ │ │ └── OperatorValueConverter.java
│ │ │ ├── runner/
│ │ │ │ ├── MongoCommandLineState.java
│ │ │ │ ├── MongoRunConfiguration.java
│ │ │ │ ├── MongoRunConfigurationEditor.form
│ │ │ │ ├── MongoRunConfigurationEditor.java
│ │ │ │ ├── MongoRunConfigurationType.java
│ │ │ │ └── MongoScriptRunConfigurationProducer.java
│ │ │ └── view/
│ │ │ ├── AbstractAddDialog.java
│ │ │ ├── AddKeyDialog.form
│ │ │ ├── AddKeyDialog.java
│ │ │ ├── AddValueDialog.form
│ │ │ ├── AddValueDialog.java
│ │ │ ├── JsonTreeTableView.java
│ │ │ ├── MongoAuthenticationPanel.form
│ │ │ ├── MongoAuthenticationPanel.java
│ │ │ ├── MongoEditionPanel.form
│ │ │ ├── MongoEditionPanel.java
│ │ │ ├── MongoPanel.form
│ │ │ ├── MongoPanel.java
│ │ │ ├── MongoResultPanel.form
│ │ │ ├── MongoResultPanel.java
│ │ │ ├── QueryPanel.form
│ │ │ ├── QueryPanel.java
│ │ │ ├── action/
│ │ │ │ ├── AddMongoDocumentAction.java
│ │ │ │ ├── CloseFindEditorAction.java
│ │ │ │ ├── CopyResultAction.java
│ │ │ │ ├── DropCollectionAction.java
│ │ │ │ ├── DropDatabaseAction.java
│ │ │ │ ├── EditMongoDocumentAction.java
│ │ │ │ ├── EnableAggregateAction.java
│ │ │ │ ├── OpenFindAction.java
│ │ │ │ ├── OperatorCompletionAction.java
│ │ │ │ └── edition/
│ │ │ │ ├── AddKeyAction.java
│ │ │ │ ├── AddValueAction.java
│ │ │ │ └── DeleteKeyAction.java
│ │ │ ├── console/
│ │ │ │ └── MongoConsoleRunner.java
│ │ │ ├── editor/
│ │ │ │ ├── MongoFakeFileType.java
│ │ │ │ └── MongoObjectFile.java
│ │ │ ├── model/
│ │ │ │ └── JsonTreeModel.java
│ │ │ ├── nodedescriptor/
│ │ │ │ ├── MongoKeyValueDescriptor.java
│ │ │ │ ├── MongoResultDescriptor.java
│ │ │ │ └── MongoValueDescriptor.java
│ │ │ └── table/
│ │ │ └── MongoDatePickerCellEditor.java
│ │ └── redis/
│ │ ├── RedisUI.java
│ │ ├── RedisUtils.java
│ │ ├── logic/
│ │ │ └── RedisClient.java
│ │ ├── model/
│ │ │ ├── RedisDatabase.java
│ │ │ ├── RedisKeyType.java
│ │ │ ├── RedisQuery.java
│ │ │ ├── RedisRecord.java
│ │ │ └── RedisResult.java
│ │ └── view/
│ │ ├── RedisAuthenticationPanel.form
│ │ ├── RedisAuthenticationPanel.java
│ │ ├── RedisFragmentedKeyTreeModel.java
│ │ ├── RedisPanel.form
│ │ ├── RedisPanel.java
│ │ ├── RedisTreeModel.java
│ │ ├── action/
│ │ │ ├── EnableGroupingAction.java
│ │ │ └── SetSeparatorAction.java
│ │ ├── console/
│ │ │ └── RedisConsoleRunner.java
│ │ ├── editor/
│ │ │ ├── RedisFakeFileType.java
│ │ │ └── RedisObjectFile.java
│ │ └── nodedescriptor/
│ │ ├── FragmentedKeyNodeDescriptor.java
│ │ ├── RedisKeyValueDescriptor.java
│ │ ├── RedisResultDescriptor.java
│ │ └── RedisValueDescriptor.java
│ └── resources/
│ ├── META-INF/
│ │ └── plugin.xml
│ └── assemblies/
│ └── plugin-assembly.xml
└── test/
├── java/
│ └── org/
│ └── codinjutsu/
│ └── tools/
│ └── nosql/
│ ├── commons/
│ │ ├── utils/
│ │ │ ├── DateUtilsTest.java
│ │ │ └── StringUtilsTest.java
│ │ └── view/
│ │ └── TableCellReader.java
│ ├── couchbase/
│ │ ├── CouchbaseClientTest.java
│ │ └── view/
│ │ ├── CouchbasePanelTest.java
│ │ └── ServerConfigurationPanelTest.java
│ ├── mongo/
│ │ ├── logic/
│ │ │ ├── MongoClientTest.java
│ │ │ └── MongoClientURIBuilderTest.java
│ │ └── view/
│ │ ├── MongoEditionPanelTest.java
│ │ ├── MongoResultPanelTest.java
│ │ ├── ServerConfigurationPanelTest.java
│ │ └── model/
│ │ └── JsonTreeModelTest.java
│ └── redis/
│ ├── logic/
│ │ └── RedisClientTest.java
│ └── view/
│ ├── RedisPanelTest.java
│ └── ServerConfigurationPanelTest.java
└── resources/
└── org/
└── codinjutsu/
└── tools/
└── nosql/
└── mongo/
├── logic/
│ └── dummyCollection.json
└── view/
├── arrayOfDocuments.json
├── model/
│ ├── arrayOfDocuments.json
│ ├── simpleDocument.json
│ ├── simpleDocumentWithInnerNodes.json
│ └── simpleDocumentWithSubList.json
├── simpleArray.json
├── simpleDocument.json
├── simpleDocumentForEdition.json
├── simpleDocumentWithSubList.json
└── structuredDocument.json
SYMBOL INDEX (1127 symbols across 140 files)
FILE: src/main/java/org/codinjutsu/tools/nosql/ConfigurationDialog.java
class ConfigurationDialog (line 28) | class ConfigurationDialog extends DialogWrapper {
method ConfigurationDialog (line 34) | ConfigurationDialog(Component parent,
method createCenterPanel (line 44) | @Nullable
method doValidate (line 52) | @Nullable
method doOKAction (line 58) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendor.java
type DatabaseVendor (line 23) | public enum DatabaseVendor {
method DatabaseVendor (line 34) | DatabaseVendor(String name, String iconFilename, String defaultUrl, St...
method toString (line 41) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorClientManager.java
class DatabaseVendorClientManager (line 30) | public class DatabaseVendorClientManager {
method DatabaseVendorClientManager (line 42) | public DatabaseVendorClientManager(Project project) {
method getInstance (line 46) | public static DatabaseVendorClientManager getInstance(Project project) {
method get (line 50) | public DatabaseClient get(DatabaseVendor databaseVendor) {
method cleanUpServers (line 54) | public void cleanUpServers() {
method registerServer (line 60) | public void registerServer(DatabaseServer databaseServer) {
method loadServer (line 64) | public void loadServer(DatabaseServer databaseServer) {
FILE: src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorUIManager.java
class DatabaseVendorUIManager (line 33) | public class DatabaseVendorUIManager {
method DatabaseVendorUIManager (line 45) | public DatabaseVendorUIManager(Project project) {
method getInstance (line 49) | public static DatabaseVendorUIManager getInstance(Project project) {
method get (line 53) | public DatabaseUI get(DatabaseVendor databaseVendor) {
method accept (line 57) | public boolean accept(VirtualFile file) {
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlComponent.java
class NoSqlComponent (line 24) | public class NoSqlComponent extends AbstractProjectComponent {
method NoSqlComponent (line 28) | public NoSqlComponent(Project project) {
method getComponentName (line 33) | @NotNull
method projectOpened (line 39) | public void projectOpened() {
method projectClosed (line 43) | public void projectClosed() {
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlConfigurable.java
class NoSqlConfigurable (line 55) | public class NoSqlConfigurable extends BaseConfigurable {
method NoSqlConfigurable (line 73) | public NoSqlConfigurable(Project project) {
method getDisplayName (line 87) | @Nls
method getHelpTopic (line 93) | @Nullable
method createComponent (line 99) | @Nullable
method isModified (line 237) | public boolean isModified() {
method apply (line 241) | @Override
method isMongoShellPathModified (line 259) | private boolean isMongoShellPathModified() {
method isRedisShellPathModified (line 263) | private boolean isRedisShellPathModified() {
method areConfigurationsModified (line 267) | private boolean areConfigurationsModified() {
method reset (line 283) | @Override
method disposeUIResources (line 287) | @Override
method stopEditing (line 296) | private void stopEditing() {
class ShellPathPanel (line 306) | private class ShellPathPanel extends JPanel implements Disposable {
method ShellPathPanel (line 312) | private ShellPathPanel(DatabaseVendor databaseVendor, String testPar...
method createLabel (line 321) | private JLabel createLabel(String databaseVendorName) {
method createTestButton (line 325) | private JButton createTestButton(final DatabaseVendor databaseVendor...
method testPath (line 337) | private void testPath(final DatabaseVendor databaseVendor) {
method checkShellPath (line 357) | public ProcessOutput checkShellPath(DatabaseVendor databaseVendor, S...
method getShellPath (line 386) | public String getShellPath() {
method isShellPathModified (line 395) | public boolean isShellPathModified(String shellPath) {
method createShellPathField (line 399) | private LabeledComponent<TextFieldWithBrowseButton> createShellPathF...
method dispose (line 412) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlConfiguration.java
class NoSqlConfiguration (line 28) | @SuppressWarnings("unused")
method getInstance (line 41) | public static NoSqlConfiguration getInstance(Project project) {
method getState (line 46) | public NoSqlConfiguration getState() {
method loadState (line 50) | public void loadState(NoSqlConfiguration noSqlConfiguration) {
method setServerConfigurations (line 54) | public void setServerConfigurations(List<ServerConfiguration> serverCo...
method getServerConfigurations (line 58) | public List<ServerConfiguration> getServerConfigurations() {
method getShellPath (line 62) | public String getShellPath(DatabaseVendor databaseVendor) {
method setShellPathByDatabaseVendor (line 66) | public void setShellPathByDatabaseVendor(Map<DatabaseVendor, String> s...
method getShellPathByDatabaseVendor (line 70) | public Map<DatabaseVendor, String> getShellPathByDatabaseVendor() {
method setShellPath (line 74) | public void setShellPath(DatabaseVendor databaseVendor, String shellPa...
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlExplorerPanel.java
class NoSqlExplorerPanel (line 69) | public class NoSqlExplorerPanel extends JPanel implements Disposable {
method NoSqlExplorerPanel (line 83) | public NoSqlExplorerPanel(Project project, DatabaseVendorClientManager...
method reloadAllServerConfigurations (line 109) | public void reloadAllServerConfigurations() {
method reloadServerConfiguration (line 136) | public void reloadServerConfiguration(final DefaultMutableTreeNode ser...
method addDatabasesIfAny (line 179) | private void addDatabasesIfAny(DatabaseServer databaseServer, DefaultM...
method getServerConfigurations (line 192) | private List<ServerConfiguration> getServerConfigurations() {
method installActions (line 196) | public void installActions() {
method expandAll (line 290) | private void expandAll() {
method collapseAll (line 294) | private void collapseAll() {
method dispose (line 298) | @Override
method getSelectedServerNode (line 303) | public DefaultMutableTreeNode getSelectedServerNode() {
method getSelectedDatabaseNode (line 323) | private DefaultMutableTreeNode getSelectedDatabaseNode() {
method getSelectedCollectionNode (line 339) | private DefaultMutableTreeNode getSelectedCollectionNode() {
method getConfiguration (line 350) | public ServerConfiguration getConfiguration() {
method getSelectedRedisDatabase (line 360) | public RedisDatabase getSelectedRedisDatabase() {
method getSelectedCouchaseDatabase (line 374) | public CouchbaseDatabase getSelectedCouchaseDatabase() {
method getSelectedMongoDatabase (line 387) | public MongoDatabase getSelectedMongoDatabase() {
method getSelectedCollection (line 402) | public MongoCollection getSelectedCollection() {
method loadRecords (line 411) | public void loadRecords() {
method createNoSqlObjectFile (line 415) | @NotNull
method dropCollection (line 426) | public void dropCollection() {// TODO need to put in a customizer
method dropDatabase (line 432) | public void dropDatabase() {// TODO need to put in a customizer
method createTree (line 438) | private Tree createTree() {
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlServerTableModel.java
class NoSqlServerTableModel (line 24) | class NoSqlServerTableModel extends AbstractTableModel implements ItemRe...
method NoSqlServerTableModel (line 35) | public NoSqlServerTableModel(List<ServerConfiguration> mongoServerConf...
method getColumnName (line 39) | public String getColumnName(int column) {
method getColumnClass (line 43) | public Class getColumnClass(int column) {
method getColumnCount (line 47) | public int getColumnCount() {
method getRowCount (line 51) | public int getRowCount() {
method isCellEditable (line 55) | @Override
method getValueAt (line 60) | public Object getValueAt(int row, int column) {
method setValueAt (line 81) | public void setValueAt(Object value, int row, int column) {
method removeRow (line 106) | public void removeRow(int index) {
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlTreeRenderer.java
class NoSqlTreeRenderer (line 32) | public class NoSqlTreeRenderer extends ColoredTreeCellRenderer {
method customizeCellRenderer (line 37) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/NoSqlWindowManager.java
class NoSqlWindowManager (line 32) | public class NoSqlWindowManager {
method getInstance (line 42) | public static NoSqlWindowManager getInstance(Project project) {
method NoSqlWindowManager (line 46) | public NoSqlWindowManager(Project project) {
method unregisterMyself (line 59) | public void unregisterMyself() {
method apply (line 64) | public void apply() {
FILE: src/main/java/org/codinjutsu/tools/nosql/SelectDatabaseVendorDialog.java
class SelectDatabaseVendorDialog (line 27) | public class SelectDatabaseVendorDialog extends DialogWrapper {
method SelectDatabaseVendorDialog (line 33) | protected SelectDatabaseVendorDialog(Component parent) {
method createCenterPanel (line 40) | @Nullable
method init (line 46) | @Override
method initCombobox (line 52) | private void initCombobox() {
method getSelectedDatabaseVendor (line 67) | public DatabaseVendor getSelectedDatabaseVendor() {
FILE: src/main/java/org/codinjutsu/tools/nosql/ServerConfiguration.java
class ServerConfiguration (line 21) | public class ServerConfiguration implements Cloneable {
method getDatabaseVendor (line 38) | public DatabaseVendor getDatabaseVendor() {
method setDatabaseVendor (line 42) | public void setDatabaseVendor(DatabaseVendor databaseVendor) {
method getServerUrl (line 46) | public String getServerUrl() {
method setServerUrl (line 50) | public void setServerUrl(String serverUrl) {
method setUserDatabase (line 54) | public void setUserDatabase(String userDatabase) {
method getUserDatabase (line 58) | public String getUserDatabase() {
method isConnectOnIdeStartup (line 62) | public boolean isConnectOnIdeStartup() {
method setConnectOnIdeStartup (line 66) | public void setConnectOnIdeStartup(boolean connectOnIdeStartup) {
method getLabel (line 70) | public String getLabel() {
method setLabel (line 74) | public void setLabel(String label) {
method getShellArgumentsLine (line 78) | public String getShellArgumentsLine() {
method setShellArgumentsLine (line 82) | public void setShellArgumentsLine(String shellArgumentsLine) {
method getShellWorkingDir (line 86) | public String getShellWorkingDir() {
method setShellWorkingDir (line 90) | public void setShellWorkingDir(String shellWorkingDir) {
method isSingleServer (line 94) | public boolean isSingleServer() {
method setAuthenticationSettings (line 98) | public void setAuthenticationSettings(AuthenticationSettings authentic...
method getAuthenticationSettings (line 103) | public AuthenticationSettings getAuthenticationSettings() {
method clone (line 107) | public ServerConfiguration clone() {
method equals (line 115) | @Override
method hashCode (line 135) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/DatabaseUI.java
type DatabaseUI (line 24) | public interface DatabaseUI {
method createAythenticationView (line 25) | AuthenticationView createAythenticationView();
method createResultPanel (line 27) | NoSqlResultView createResultPanel(Project project, NoSqlDatabaseObject...
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/logic/ConfigurationException.java
class ConfigurationException (line 19) | public class ConfigurationException extends RuntimeException {
method ConfigurationException (line 20) | public ConfigurationException(String message) {
method ConfigurationException (line 24) | public ConfigurationException(Exception ex) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/logic/DatabaseClient.java
type DatabaseClient (line 22) | public interface DatabaseClient {
method connect (line 24) | void connect(ServerConfiguration serverConfiguration);
method loadServer (line 26) | void loadServer(DatabaseServer databaseServer);
method cleanUpServers (line 28) | void cleanUpServers();
method registerServer (line 30) | void registerServer(DatabaseServer databaseServer);
method defaultConfiguration (line 32) | ServerConfiguration defaultConfiguration();
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/AuthenticationSettings.java
class AuthenticationSettings (line 22) | public class AuthenticationSettings {
method getUsername (line 29) | public String getUsername() {
method setUsername (line 33) | public void setUsername(String username) {
method getPassword (line 37) | public String getPassword() {
method setPassword (line 41) | public void setPassword(String password) {
method getExtras (line 45) | public Map<String, String> getExtras() {
method setExtras (line 49) | public void setExtras(Map<String, String> extras) {
method equals (line 53) | @Override
method hashCode (line 66) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/Database.java
class Database (line 19) | public class Database {
method Database (line 22) | public Database(String name) {
method getName (line 26) | public String getName() {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/model/DatabaseServer.java
class DatabaseServer (line 24) | public class DatabaseServer {
type Status (line 26) | public enum Status {
method DatabaseServer (line 36) | public DatabaseServer(ServerConfiguration configuration) {
method getServerUrl (line 40) | public String getServerUrl() {
method getLabel (line 44) | public String getLabel() {
method setDatabases (line 48) | public void setDatabases(List<Database> databases) {
method hasDatabases (line 52) | public boolean hasDatabases() {
method getDatabases (line 56) | public List<Database> getDatabases() {
method getStatus (line 60) | public Status getStatus() {
method setStatus (line 64) | public void setStatus(Status status) {
method getConfiguration (line 68) | public ServerConfiguration getConfiguration() {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/style/StyleAttributesProvider.java
class StyleAttributesProvider (line 25) | public class StyleAttributesProvider {
method getIndexAttribute (line 41) | public static SimpleTextAttributes getIndexAttribute() {
method getKeyValueAttribute (line 45) | public static SimpleTextAttributes getKeyValueAttribute() {
method getNumberAttribute (line 49) | public static SimpleTextAttributes getNumberAttribute() {
method getBooleanAttribute (line 53) | public static SimpleTextAttributes getBooleanAttribute() {
method getStringAttribute (line 57) | public static SimpleTextAttributes getStringAttribute() {
method getNullAttribute (line 61) | public static SimpleTextAttributes getNullAttribute() {
method getObjectAttribute (line 65) | public static SimpleTextAttributes getObjectAttribute() {
method getObjectIdAttribute (line 69) | public static SimpleTextAttributes getObjectIdAttribute() {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/DateUtils.java
class DateUtils (line 23) | public class DateUtils {
method utcDateTime (line 25) | public static DateFormat utcDateTime(Locale locale) {
method utcTime (line 31) | public static DateFormat utcTime(Locale locale) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/GuiUtils.java
class GuiUtils (line 36) | public class GuiUtils {
method loadIcon (line 40) | public static Icon loadIcon(String iconFilename) {
method loadIcon (line 44) | public static Icon loadIcon(String iconFilename, String darkIconFilena...
method getIconResource (line 54) | public static URL getIconResource(String iconFilename) {
method installActionGroupInToolBar (line 58) | public static void installActionGroupInToolBar(DefaultActionGroup acti...
method isUnderDarcula (line 67) | public static boolean isUnderDarcula() {
method runInSwingThread (line 71) | public static void runInSwingThread(Runnable runnable) {
method expand (line 76) | public static void expand(@NotNull JTree tree, @NotNull TreePath path,...
method enlargeWidth (line 86) | public static Dimension enlargeWidth(Dimension preferredSize, double f...
method showNotification (line 91) | public static void showNotification(final JComponent component, final ...
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/utils/StringUtils.java
class StringUtils (line 19) | public class StringUtils {
method abbreviateInCenter (line 23) | public static String abbreviateInCenter(String stringToAbbreviate, int...
method parseNumber (line 33) | public static Number parseNumber(String number) {
method explode (line 49) | public static String[] explode(String key, String separator) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/AuthenticationView.java
type AuthenticationView (line 23) | public interface AuthenticationView {
method getComponent (line 26) | JPanel getComponent();
method create (line 28) | AuthenticationSettings create();
method load (line 30) | void load(AuthenticationSettings settings);
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ErrorPanel.java
class ErrorPanel (line 29) | public class ErrorPanel extends JPanel {
method ErrorPanel (line 31) | public ErrorPanel(final Exception ex) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlResultView.java
class NoSqlResultView (line 23) | public abstract class NoSqlResultView<R> extends JPanel implements Dispo...
method showResults (line 25) | public abstract void showResults();
method getResultPanel (line 27) | public abstract JPanel getResultPanel();
method getRecords (line 29) | public abstract R getRecords();
method executeQuery (line 31) | public abstract void executeQuery();
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlTreeNode.java
class NoSqlTreeNode (line 23) | public class NoSqlTreeNode extends DefaultMutableTreeNode {
method NoSqlTreeNode (line 25) | public NoSqlTreeNode(NodeDescriptor nodeDescriptor) {
method getDescriptor (line 29) | public NodeDescriptor getDescriptor() {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanel.java
class ServerConfigurationPanel (line 39) | public class ServerConfigurationPanel extends JPanel {
method ServerConfigurationPanel (line 61) | public ServerConfigurationPanel(Project project,
method initListeners (line 99) | private void initListeners() {
method loadConfigurationData (line 133) | public void loadConfigurationData(ServerConfiguration configuration) {
method createServerConfigurationForTesting (line 144) | @NotNull
method applyConfigurationData (line 154) | public void applyConfigurationData(ServerConfiguration configuration) {
method validateInputs (line 167) | public ValidationInfo validateInputs() {
method validateUrls (line 179) | private void validateUrls() {
method getLabel (line 199) | private String getLabel() {
method getServerUrls (line 207) | private String getServerUrls() {
method getUserDatabase (line 215) | private String getUserDatabase() {
method getShellArgumentsLine (line 224) | private String getShellArgumentsLine() {
method getShellWorkingDir (line 233) | private String getShellWorkingDir() {
method isAutoConnect (line 242) | private boolean isAutoConnect() {
method createUIComponents (line 246) | private void createUIComponents() {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanelFactory.java
class ServerConfigurationPanelFactory (line 24) | public class ServerConfigurationPanelFactory {
method ServerConfigurationPanelFactory (line 30) | public ServerConfigurationPanelFactory(Project project,
method create (line 38) | public ServerConfigurationPanel create(DatabaseVendor databaseVendor) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ExecuteQuery.java
class ExecuteQuery (line 27) | public class ExecuteQuery<G extends NoSqlResultView> extends AnAction {
method ExecuteQuery (line 30) | public ExecuteQuery(G resultView) {
method actionPerformed (line 37) | @Override
method update (line 42) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/NoSqlDatabaseConsoleAction.java
class NoSqlDatabaseConsoleAction (line 34) | public class NoSqlDatabaseConsoleAction extends AnAction implements Dumb...
method NoSqlDatabaseConsoleAction (line 39) | public NoSqlDatabaseConsoleAction(NoSqlExplorerPanel noSqlExplorerPane...
method update (line 45) | @Override
method actionPerformed (line 70) | @Override
method runShell (line 78) | private void runShell(Project project) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/OpenPluginSettingsAction.java
class OpenPluginSettingsAction (line 28) | public class OpenPluginSettingsAction extends AnAction implements DumbAw...
method OpenPluginSettingsAction (line 30) | public OpenPluginSettingsAction() {
method actionPerformed (line 34) | @Override
method showSettingsFor (line 39) | private static void showSettingsFor(Project project) {
method getProject (line 43) | private static Project getProject(AnActionEvent event) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/RefreshServerAction.java
class RefreshServerAction (line 30) | public class RefreshServerAction extends AnAction implements DumbAware {
method RefreshServerAction (line 39) | public RefreshServerAction(NoSqlExplorerPanel noSqlExplorerPanel) {
method actionPerformed (line 44) | @Override
method update (line 49) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ViewCollectionValuesAction.java
class ViewCollectionValuesAction (line 27) | public class ViewCollectionValuesAction extends AnAction implements Dumb...
method ViewCollectionValuesAction (line 33) | public ViewCollectionValuesAction(NoSqlExplorerPanel noSqlExplorerPane...
method actionPerformed (line 38) | @Override
method update (line 43) | public void update(AnActionEvent event) {
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/console/NoSqlConsoleView.java
class NoSqlConsoleView (line 24) | public class NoSqlConsoleView extends LanguageConsoleImpl {
method NoSqlConsoleView (line 25) | public NoSqlConsoleView(Project project, String title, ServerConfigura...
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditor.java
class NoSqlDatabaseDataEditor (line 34) | public class NoSqlDatabaseDataEditor extends UserDataHolderBase implemen...
method NoSqlDatabaseDataEditor (line 40) | public NoSqlDatabaseDataEditor(NoSqlResultView noSqlResultView) {
method getComponent (line 50) | @NotNull
method getPreferredFocusedComponent (line 56) | @Nullable
method getName (line 62) | @NotNull
method dispose (line 68) | @Override
method isDisposed (line 77) | public boolean isDisposed() {
method getState (line 81) | @NotNull
method setState (line 89) | @Override
method isModified (line 94) | @Override
method isValid (line 99) | @Override
method selectNotify (line 104) | @Override
method deselectNotify (line 109) | @Override
method addPropertyChangeListener (line 114) | @Override
method removePropertyChangeListener (line 119) | @Override
method getBackgroundHighlighter (line 124) | @Nullable
method getCurrentLocation (line 130) | @Nullable
method getStructureViewBuilder (line 136) | @Nullable
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditorProvider.java
class NoSqlDatabaseDataEditorProvider (line 32) | public class NoSqlDatabaseDataEditorProvider implements FileEditorProvid...
method accept (line 35) | @Override
method createEditor (line 40) | @NotNull
method disposeEditor (line 52) | @Override
method initComponent (line 57) | @Override
method disposeComponent (line 61) | @Override
method readState (line 65) | @NotNull
method writeState (line 71) | @Override
method getEditorTypeId (line 75) | @NotNull
method getPolicy (line 81) | @NotNull
method getComponentName (line 87) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseFileSystem.java
class NoSqlDatabaseFileSystem (line 31) | public class NoSqlDatabaseFileSystem extends VirtualFileSystem implement...
method getInstance (line 35) | public static NoSqlDatabaseFileSystem getInstance() {
method getComponentName (line 39) | @NotNull
method getProtocol (line 45) | @NotNull
method initComponent (line 51) | @Override
method disposeComponent (line 56) | @Override
method openEditor (line 61) | public void openEditor(final NoSqlDatabaseObjectFile databaseObjectFil...
method findFileByPath (line 68) | @Nullable
method refresh (line 74) | @Override
method refreshAndFindFileByPath (line 79) | @Nullable
method addVirtualFileListener (line 85) | @Override
method removeVirtualFileListener (line 90) | @Override
method deleteFile (line 95) | @Override
method moveFile (line 100) | @Override
method renameFile (line 105) | @Override
method createChildFile (line 110) | @Override
method createChildDirectory (line 115) | @NotNull
method copyFile (line 121) | @Override
method isReadOnly (line 126) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseObjectFile.java
class NoSqlDatabaseObjectFile (line 31) | public abstract class NoSqlDatabaseObjectFile extends VirtualFile {
method NoSqlDatabaseObjectFile (line 38) | protected NoSqlDatabaseObjectFile(Project project, ServerConfiguration...
method getName (line 45) | @NotNull
method getFileSystem (line 51) | @NotNull
method getPath (line 57) | @NotNull
method isValid (line 63) | @Override
method isWritable (line 68) | @Override
method isDirectory (line 73) | @Override
method getConfiguration (line 78) | public ServerConfiguration getConfiguration() {
method getProject (line 82) | public Project getProject() {
method getParent (line 87) | @Override
method getChildren (line 92) | @Override
method getOutputStream (line 97) | @NotNull
method getModificationStamp (line 103) | @Override
method contentsToByteArray (line 108) | @NotNull
method getTimeStamp (line 114) | @Override
method getLength (line 119) | @Override
method refresh (line 124) | @Override
method getInputStream (line 129) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/nodedescriptor/NodeDescriptor.java
type NodeDescriptor (line 23) | public interface NodeDescriptor {
method renderValue (line 27) | void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNode...
method renderNode (line 29) | void renderNode(ColoredTreeCellRenderer cellRenderer);
method getFormattedKey (line 31) | String getFormattedKey();
method getFormattedValue (line 33) | String getFormattedValue();
method getValue (line 35) | Object getValue();
method setValue (line 37) | void setValue(Object value);
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/KeyCellRenderer.java
class KeyCellRenderer (line 26) | public class KeyCellRenderer extends ColoredTreeCellRenderer {
method customizeCellRenderer (line 28) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/ValueCellRenderer.java
class ValueCellRenderer (line 27) | public class ValueCellRenderer extends ColoredTableCellRenderer {
method customizeCellRenderer (line 29) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/table/CellEditor.java
class CellEditor (line 25) | public class CellEditor extends DefaultCellEditor {
method CellEditor (line 28) | public CellEditor() {
method getTableCellEditorComponent (line 33) | @Override
method getCellEditorValue (line 44) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/commons/view/table/DateTimePicker.java
class DateTimePicker (line 41) | public class DateTimePicker extends JXDatePicker {
method create (line 56) | public static DateTimePicker create() {
method DateTimePicker (line 66) | private DateTimePicker() {
method commitEdit (line 71) | public void commitEdit() throws ParseException {
method cancelEdit (line 76) | public void cancelEdit() {
method getLinkPanel (line 81) | @Override
method getDate (line 91) | @Override
method createTimePanel (line 96) | private JPanel createTimePanel() {
method updateTextFieldFormat (line 108) | private void updateTextFieldFormat() {
method commitTime (line 117) | private void commitTime() {
method setTimeSpinners (line 136) | private void setTimeSpinners() {
method setTimeFormat (line 143) | public void setTimeFormat(DateFormat timeFormat) {
method applyUIStyle (line 148) | private void applyUIStyle() {
method main (line 164) | public static void main(String[] args) {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/CouchbaseUI.java
class CouchbaseUI (line 29) | public class CouchbaseUI implements DatabaseUI {
method createAythenticationView (line 30) | @Override
method createResultPanel (line 35) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/logic/CouchbaseClient.java
class CouchbaseClient (line 53) | public class CouchbaseClient implements DatabaseClient {
method getInstance (line 55) | public static CouchbaseClient getInstance(Project project) {
method connect (line 59) | @Override
method loadServer (line 82) | @Override
method cleanUpServers (line 107) | @Override
method registerServer (line 112) | @Override
method defaultConfiguration (line 117) | @Override
method loadRecords (line 126) | public CouchbaseResult loadRecords(ServerConfiguration configuration, ...
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseDatabase.java
class CouchbaseDatabase (line 21) | public class CouchbaseDatabase extends Database {
method CouchbaseDatabase (line 23) | public CouchbaseDatabase(String name) {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseQuery.java
class CouchbaseQuery (line 19) | public class CouchbaseQuery {
method CouchbaseQuery (line 23) | public CouchbaseQuery(int limit) {
method getLimit (line 27) | public int getLimit() {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseResult.java
class CouchbaseResult (line 24) | public class CouchbaseResult {
method CouchbaseResult (line 29) | public CouchbaseResult(String name) {
method add (line 33) | public void add(JsonObject jsonObject) {
method addErrors (line 37) | public void addErrors(List<JsonObject> errors) {
method getName (line 41) | public String getName() {
method getRecords (line 45) | public List<JsonObject> getRecords() {
method hasErrors (line 49) | public boolean hasErrors() {
method getErrors (line 53) | public List<JsonObject> getErrors() {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbaseAuthenticationPanel.java
class CouchbaseAuthenticationPanel (line 25) | public class CouchbaseAuthenticationPanel implements AuthenticationView {
method CouchbaseAuthenticationPanel (line 31) | public CouchbaseAuthenticationPanel() {
method getComponent (line 36) | @Override
method create (line 41) | @Override
method load (line 49) | @Override
method getUsername (line 55) | private String getUsername() {
method getPassword (line 63) | private String getPassword() {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbasePanel.java
class CouchbasePanel (line 57) | public class CouchbasePanel extends NoSqlResultView<CouchbaseDatabase> {
method CouchbasePanel (line 75) | public CouchbasePanel(Project project, CouchbaseClient couchbaseClient...
method loadAndDisplayResults (line 92) | private void loadAndDisplayResults(final int limit) throws Exception {
method updateResultTableTree (line 100) | void updateResultTableTree(CouchbaseResult couchbaseResult) {
method initToolbar (line 111) | private void initToolbar() {
method addCommonsActions (line 127) | protected void addCommonsActions() {
method getLimit (line 179) | private int getLimit() {
method expandAll (line 183) | void expandAll() {
method collapseAll (line 187) | void collapseAll() {
method showResults (line 192) | @Override
method getResultPanel (line 197) | @Override
method getRecords (line 202) | @Override
method executeQuery (line 207) | @Override
method dispose (line 238) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbaseTreeModel.java
class CouchbaseTreeModel (line 29) | public class CouchbaseTreeModel extends DefaultTreeModel {
method CouchbaseTreeModel (line 30) | public CouchbaseTreeModel(CouchbaseResult result) {
method buildTree (line 34) | public static NoSqlTreeNode buildTree(CouchbaseResult couchbaseResult) {
method processRecord (line 43) | private static void processRecord(NoSqlTreeNode parentNode, JsonObject...
method processRecordListValues (line 57) | private static void processRecordListValues(NoSqlTreeNode parentNode, ...
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/editor/CouchbaseFakeFileType.java
class CouchbaseFakeFileType (line 27) | public class CouchbaseFakeFileType extends FakeFileType {
method getIcon (line 35) | @Override
method isMyFileType (line 40) | @Override
method getDefaultExtension (line 45) | @NotNull
method getName (line 51) | @NotNull
method getDescription (line 57) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/editor/CouchbaseObjectFile.java
class CouchbaseObjectFile (line 26) | public class CouchbaseObjectFile extends NoSqlDatabaseObjectFile {
method CouchbaseObjectFile (line 29) | public CouchbaseObjectFile(Project project, ServerConfiguration config...
method getFileType (line 34) | @NotNull
method getDatabase (line 39) | public CouchbaseDatabase getDatabase() {
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseKeyValueDescriptor.java
class CouchbaseKeyValueDescriptor (line 28) | public class CouchbaseKeyValueDescriptor implements NodeDescriptor {
method createDescriptor (line 38) | public static CouchbaseKeyValueDescriptor createDescriptor(String key,...
method CouchbaseKeyValueDescriptor (line 58) | private CouchbaseKeyValueDescriptor(String key, Object value, SimpleTe...
method renderValue (line 65) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 71) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 75) | public String getFormattedKey() {
method getFormattedValue (line 79) | public String getFormattedValue() {
method getKey (line 83) | public String getKey() {
method getValue (line 87) | public Object getValue() {
method setValue (line 91) | public void setValue(Object value) {
method toString (line 95) | @Override
method getValueAndAbbreviateIfNecessary (line 100) | protected String getValueAndAbbreviateIfNecessary() {
class CouchbaseKeyNullValueDescriptor (line 108) | private static class CouchbaseKeyNullValueDescriptor extends Couchbase...
method CouchbaseKeyNullValueDescriptor (line 110) | private CouchbaseKeyNullValueDescriptor(String key) {
method getValueAndAbbreviateIfNecessary (line 114) | protected String getValueAndAbbreviateIfNecessary() {
class CouchbaseKeyStringValueDescriptor (line 119) | private static class CouchbaseKeyStringValueDescriptor extends Couchba...
method CouchbaseKeyStringValueDescriptor (line 124) | private CouchbaseKeyStringValueDescriptor(String key, String value) {
method getValueAndAbbreviateIfNecessary (line 128) | @Override
method toString (line 133) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseResultDescriptor.java
class CouchbaseResultDescriptor (line 23) | public class CouchbaseResultDescriptor implements NodeDescriptor {
method CouchbaseResultDescriptor (line 27) | public CouchbaseResultDescriptor(String collectionName) {
method CouchbaseResultDescriptor (line 31) | public CouchbaseResultDescriptor() {
method renderValue (line 35) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 38) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 42) | public String getFormattedKey() {
method getFormattedValue (line 46) | @Override
method getValue (line 51) | @Override
method setValue (line 56) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseValueDescriptor.java
class CouchbaseValueDescriptor (line 26) | public class CouchbaseValueDescriptor implements NodeDescriptor {
method createDescriptor (line 32) | public static CouchbaseValueDescriptor createDescriptor(int index, Obj...
method CouchbaseValueDescriptor (line 40) | private CouchbaseValueDescriptor(int index, Object value, SimpleTextAt...
method renderValue (line 46) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 52) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 56) | public String getFormattedKey() {
method getFormattedValue (line 60) | public String getFormattedValue() {
method getValueAndAbbreviateIfNecessary (line 64) | protected String getValueAndAbbreviateIfNecessary() {
method getValue (line 72) | public Object getValue() {
method setValue (line 76) | public void setValue(Object value) {
method toString (line 80) | @Override
class CouchbaseStringValueDescriptor (line 85) | private static class CouchbaseStringValueDescriptor extends CouchbaseV...
method CouchbaseStringValueDescriptor (line 87) | private CouchbaseStringValueDescriptor(int index, String value) {
method getFormattedValue (line 91) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/MongoUI.java
class MongoUI (line 29) | public class MongoUI implements DatabaseUI {
method createAythenticationView (line 32) | @Override
method createResultPanel (line 37) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/MongoUtils.java
class MongoUtils (line 22) | public class MongoUtils {
method MongoUtils (line 24) | private MongoUtils() {
method buildMongoUrl (line 27) | public static String buildMongoUrl(ServerConfiguration serverConfigura...
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClient.java
class MongoClient (line 41) | public class MongoClient implements DatabaseClient {
method getInstance (line 46) | public static MongoClient getInstance(Project project) {
method connect (line 50) | public void connect(ServerConfiguration configuration) {
method cleanUpServers (line 76) | public void cleanUpServers() {
method registerServer (line 80) | public void registerServer(DatabaseServer databaseServer) {
method defaultConfiguration (line 84) | @Override
method getServers (line 92) | public List<DatabaseServer> getServers() {
method loadServer (line 96) | public void loadServer(DatabaseServer databaseServer) {
method loadDatabaseCollections (line 103) | List<Database> loadDatabaseCollections(ServerConfiguration configurati...
method createMongoDatabaseAndItsCollections (line 133) | private MongoDatabase createMongoDatabaseAndItsCollections(DB database) {
method update (line 144) | public void update(ServerConfiguration configuration, MongoCollection ...
method delete (line 163) | public void delete(ServerConfiguration configuration, MongoCollection ...
method dropCollection (line 182) | public void dropCollection(ServerConfiguration configuration, MongoCol...
method dropDatabase (line 201) | public void dropDatabase(ServerConfiguration configuration, MongoDatab...
method loadCollectionValues (line 215) | public MongoResult loadCollectionValues(ServerConfiguration configurat...
method findMongoDocument (line 240) | public DBObject findMongoDocument(ServerConfiguration configuration, M...
method aggregate (line 259) | private MongoResult aggregate(MongoQueryOptions mongoQueryOptions, Mon...
method find (line 269) | private MongoResult find(MongoQueryOptions mongoQueryOptions, MongoRes...
method createMongoClient (line 297) | private com.mongodb.MongoClient createMongoClient(ServerConfiguration ...
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientURIBuilder.java
class MongoClientURIBuilder (line 28) | public class MongoClientURIBuilder {
method MongoClientURIBuilder (line 39) | private MongoClientURIBuilder() {
method builder (line 42) | public static MongoClientURIBuilder builder() {
method setServerAddresses (line 46) | public MongoClientURIBuilder setServerAddresses(String serverUrls) {
method setCredential (line 51) | public MongoClientURIBuilder setCredential(String username, String pas...
method build (line 58) | public String build() {
method setAuthenticationMecanism (line 83) | public MongoClientURIBuilder setAuthenticationMecanism(@NotNull Authen...
method sslEnabled (line 88) | public MongoClientURIBuilder sslEnabled() {
method buildOptions (line 93) | private static String buildOptions(Map<String, String> options) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoConnectionException.java
class MongoConnectionException (line 19) | public class MongoConnectionException extends RuntimeException {
method MongoConnectionException (line 20) | public MongoConnectionException(String message) {
method MongoConnectionException (line 24) | public MongoConnectionException(Exception ex) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoExtraSettings.java
class MongoExtraSettings (line 24) | public class MongoExtraSettings {
method MongoExtraSettings (line 33) | public MongoExtraSettings() {
method MongoExtraSettings (line 36) | public MongoExtraSettings(Map<String, String> extras) {
method getAuthenticationDatabase (line 40) | public String getAuthenticationDatabase() {
method getAuthenticationMechanism (line 45) | public AuthenticationMechanism getAuthenticationMechanism() {
method isSsl (line 50) | public boolean isSsl() {
method setAuthenticationDatabase (line 55) | public void setAuthenticationDatabase(String authenticationDatabase) {
method setAuthenticationMechanism (line 59) | public void setAuthenticationMechanism(AuthenticationMechanism authent...
method setSsl (line 65) | public void setSsl(boolean isSsl) {
method get (line 69) | public Map<String, String> get() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/JsonDataType.java
type JsonDataType (line 19) | public enum JsonDataType {
method JsonDataType (line 31) | private JsonDataType(String type) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoAggregateOperator.java
type MongoAggregateOperator (line 19) | public enum MongoAggregateOperator {
method MongoAggregateOperator (line 31) | private MongoAggregateOperator(String operator) {
method getLabel (line 35) | public String getLabel() {
method toString (line 40) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoCollection.java
class MongoCollection (line 21) | public class MongoCollection implements Comparable<MongoCollection> {
method MongoCollection (line 26) | public MongoCollection(String name, String databaseName) {
method getName (line 31) | public String getName() {
method getDatabaseName (line 35) | public String getDatabaseName() {
method compareTo (line 39) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoDatabase.java
class MongoDatabase (line 25) | public class MongoDatabase extends Database {
method MongoDatabase (line 29) | public MongoDatabase(String name) {
method getName (line 33) | public String getName() {
method getCollections (line 37) | public Set<MongoCollection> getCollections() {
method addCollection (line 41) | public void addCollection(MongoCollection mongoCollection) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoQueryOptions.java
class MongoQueryOptions (line 28) | public class MongoQueryOptions {
method isAggregate (line 41) | public boolean isAggregate() {
method getOperations (line 45) | public List getOperations() {
method setOperations (line 49) | public void setOperations(String aggregateQuery) {
method setFilter (line 55) | public void setFilter(String query) {
method getFilter (line 61) | public DBObject getFilter() {
method setProjection (line 65) | public void setProjection(String query) {
method getProjection (line 72) | public DBObject getProjection() {
method setSort (line 76) | public void setSort(String query) {
method getSort (line 82) | public DBObject getSort() {
method getResultLimit (line 86) | public int getResultLimit() {
method setResultLimit (line 90) | public void setResultLimit(int resultLimit) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoResult.java
class MongoResult (line 24) | public class MongoResult {
method MongoResult (line 29) | public MongoResult(String collectionName) {
method add (line 33) | public void add(DBObject dbObject) {
method getMongoObjects (line 37) | public List<DBObject> getMongoObjects() {
method getCollectionName (line 41) | public String getCollectionName() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/model/OperatorValueConverter.java
type OperatorValueConverter (line 22) | interface OperatorValueConverter<T> {
method convert (line 24) | T convert(String operatorValue);
method convert (line 29) | @Override
method convert (line 37) | @Override
method convert (line 45) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoCommandLineState.java
class MongoCommandLineState (line 34) | class MongoCommandLineState extends CommandLineState {
method MongoCommandLineState (line 38) | public MongoCommandLineState(MongoRunConfiguration mongoRunConfigurati...
method startProcess (line 43) | @NotNull
method generateCommandLine (line 52) | private GeneralCommandLine generateCommandLine() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfiguration.java
class MongoRunConfiguration (line 46) | class MongoRunConfiguration extends ModuleBasedConfiguration<RunConfigur...
method MongoRunConfiguration (line 56) | MongoRunConfiguration(RunConfigurationModule runConfigurationModule, C...
method getConfigurationEditor (line 62) | @NotNull
method getValidModules (line 69) | @Override
method readExternal (line 75) | @Override
method writeExternal (line 84) | @Override
method createInstance (line 94) | @Override
method getState (line 99) | @Nullable
method checkConfiguration (line 112) | @Override
method getScriptPath (line 131) | public VirtualFile getScriptPath() {
method setScriptPath (line 136) | public void setScriptPath(String scriptPath) {
method getServerConfiguration (line 140) | public ServerConfiguration getServerConfiguration() {
method setServerConfiguration (line 144) | public void setServerConfiguration(ServerConfiguration serverConfigura...
method getShellParameters (line 148) | public String getShellParameters() {
method setShellParameters (line 152) | public void setShellParameters(String shellParameters) {
method getMongoShell (line 156) | public String getMongoShell() {
method getDatabase (line 160) | public MongoDatabase getDatabase() {
method setDatabase (line 164) | public void setDatabase(MongoDatabase database) {
method getShellWorkingDir (line 168) | public String getShellWorkingDir() {
method setShellWorkingDir (line 172) | public void setShellWorkingDir(String shellWorkingDir) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfigurationEditor.java
class MongoRunConfigurationEditor (line 42) | public class MongoRunConfigurationEditor extends SettingsEditor<MongoRun...
method MongoRunConfigurationEditor (line 54) | public MongoRunConfigurationEditor(Project project) {
method getAvailableMongoServers (line 109) | private DatabaseServer[] getAvailableMongoServers(Project project) {
method resetEditorFrom (line 120) | @Override
method applyEditorTo (line 127) | @Override
method getScriptPath (line 136) | private String getScriptPath() {
method getShellParameters (line 140) | private String getShellParameters() {
method getSelectedConfiguration (line 144) | private ServerConfiguration getSelectedConfiguration() {
method getSelectedDatabase (line 149) | public MongoDatabase getSelectedDatabase() {
method getShellWorkingDir (line 153) | private String getShellWorkingDir() {
method createEditor (line 162) | @NotNull
method disposeEditor (line 168) | @Override
method createUIComponents (line 173) | private void createUIComponents() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfigurationType.java
class MongoRunConfigurationType (line 27) | public class MongoRunConfigurationType implements ConfigurationType {
method MongoRunConfigurationType (line 30) | public MongoRunConfigurationType() {
method getDisplayName (line 34) | public String getDisplayName() {
method getConfigurationTypeDescription (line 38) | public String getConfigurationTypeDescription() {
method getIcon (line 42) | public Icon getIcon() {
method getId (line 46) | @NonNls
method getConfigurationFactories (line 52) | public MongoFactory[] getConfigurationFactories() {
method getInstance (line 56) | public static MongoRunConfigurationType getInstance() {
class MongoFactory (line 60) | private static class MongoFactory extends ConfigurationFactory {
method MongoFactory (line 61) | public MongoFactory(ConfigurationType type) {
method createTemplateConfiguration (line 65) | public RunConfiguration createTemplateConfiguration(Project project) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoScriptRunConfigurationProducer.java
class MongoScriptRunConfigurationProducer (line 32) | public class MongoScriptRunConfigurationProducer extends RuntimeConfigur...
method MongoScriptRunConfigurationProducer (line 36) | public MongoScriptRunConfigurationProducer() {
method getSourceElement (line 40) | @Override
method createConfigurationByElement (line 45) | @Nullable
method compareTo (line 72) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/AbstractAddDialog.java
class AbstractAddDialog (line 37) | public abstract class AbstractAddDialog extends DialogWrapper {
method AbstractAddDialog (line 56) | AbstractAddDialog(MongoEditionPanel mongoEditionPanel) {
method initCombo (line 61) | void initCombo(final ComboBox combobox, final JPanel parentPanel) {
method getValue (line 90) | public abstract Object getValue();
class TextFieldWrapper (line 92) | public static abstract class TextFieldWrapper<T extends JComponent, V> {
method TextFieldWrapper (line 96) | private TextFieldWrapper(T component) {
method getValue (line 100) | public abstract V getValue();
method reset (line 102) | public abstract void reset();
method isValueSet (line 104) | public boolean isValueSet() {
method getComponent (line 108) | public T getComponent() {
method validate (line 112) | public void validate() {
class StringFieldWrapper (line 119) | private static class StringFieldWrapper extends TextFieldWrapper<JText...
method StringFieldWrapper (line 121) | private StringFieldWrapper() {
method getValue (line 125) | @Override
method isValueSet (line 130) | @Override
method reset (line 135) | @Override
class JsonFieldWrapper (line 141) | private static class JsonFieldWrapper extends TextFieldWrapper<JTextFi...
method JsonFieldWrapper (line 143) | private JsonFieldWrapper() {
method getValue (line 147) | @Override
method isValueSet (line 152) | @Override
method reset (line 157) | @Override
class NumberFieldWrapper (line 163) | private static class NumberFieldWrapper extends TextFieldWrapper<JText...
method NumberFieldWrapper (line 165) | private NumberFieldWrapper() {
method getValue (line 169) | @Override
method reset (line 174) | @Override
method isValueSet (line 179) | @Override
method validate (line 184) | @Override
class BooleanFieldWrapper (line 191) | private static class BooleanFieldWrapper extends TextFieldWrapper<JBCh...
method BooleanFieldWrapper (line 193) | private BooleanFieldWrapper() {
method getValue (line 197) | @Override
method reset (line 202) | @Override
class NullFieldWrapper (line 208) | private static class NullFieldWrapper extends TextFieldWrapper<JLabel,...
method NullFieldWrapper (line 210) | private NullFieldWrapper() {
method getValue (line 214) | @Override
method reset (line 219) | @Override
class DateTimeFieldWrapper (line 225) | private static class DateTimeFieldWrapper extends TextFieldWrapper<Dat...
method DateTimeFieldWrapper (line 227) | private DateTimeFieldWrapper() {
method getValue (line 232) | @Override
method isValueSet (line 237) | @Override
method reset (line 242) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddKeyDialog.java
class AddKeyDialog (line 28) | public class AddKeyDialog extends AbstractAddDialog {
method AddKeyDialog (line 36) | private AddKeyDialog(MongoEditionPanel mongoEditionPanel) {
method createCenterPanel (line 44) | @Nullable
method createDialog (line 50) | public static AddKeyDialog createDialog(MongoEditionPanel parentPanel) {
method init (line 58) | @Override
method doValidate (line 64) | @Nullable
method getPreferredFocusedComponent (line 85) | @Nullable
method getKey (line 91) | public String getKey() {
method getValue (line 95) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddValueDialog.java
class AddValueDialog (line 26) | public class AddValueDialog extends AbstractAddDialog {
method AddValueDialog (line 33) | private AddValueDialog(MongoEditionPanel mongoEditionPanel) {
method createCenterPanel (line 40) | @Nullable
method createDialog (line 46) | public static AddValueDialog createDialog(MongoEditionPanel parentPane...
method init (line 53) | @Override
method doValidate (line 60) | @Nullable
method getValue (line 72) | @Override
method getPreferredFocusedComponent (line 77) | @Nullable
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/JsonTreeTableView.java
class JsonTreeTableView (line 46) | public class JsonTreeTableView extends TreeTable {
method valueOf (line 50) | public Object valueOf(Object obj) {
method getColumnClass (line 55) | @Override
method isCellEditable (line 60) | @Override
method JsonTreeTableView (line 75) | public JsonTreeTableView(TreeNode rootNode, ColumnInfo[] columnInfos) {
method getCellRenderer (line 98) | @Override
method getCellEditor (line 109) | @Override
class ReadOnlyValueColumnInfo (line 119) | private static class ReadOnlyValueColumnInfo extends ColumnInfo<NoSqlT...
method ReadOnlyValueColumnInfo (line 122) | public ReadOnlyValueColumnInfo() {
method valueOf (line 126) | public NodeDescriptor valueOf(NoSqlTreeNode treeNode) {
method getRenderer (line 130) | @Override
method isCellEditable (line 135) | @Override
class WritableColumnInfo (line 141) | private static class WritableColumnInfo extends ColumnInfo<NoSqlTreeNo...
method WritableColumnInfo (line 147) | public WritableColumnInfo() {
method getRenderer (line 151) | @Override
method isCellEditable (line 157) | @Override
method getEditor (line 171) | @Nullable
method buildDateCellEditor (line 181) | private static MongoDatePickerCellEditor buildDateCellEditor(final N...
method valueOf (line 195) | public Object valueOf(NoSqlTreeNode treeNode) {
method setValue (line 200) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoAuthenticationPanel.java
class MongoAuthenticationPanel (line 27) | public class MongoAuthenticationPanel implements AuthenticationView {
method MongoAuthenticationPanel (line 38) | public MongoAuthenticationPanel() {
method getComponent (line 56) | @Override
method create (line 61) | @Override
method load (line 76) | @Override
method isSslConnection (line 93) | private boolean isSslConnection() {
method getUsername (line 97) | private String getUsername() {
method getPassword (line 105) | private String getPassword() {
method getAuthenticationDatabase (line 113) | private String getAuthenticationDatabase() {
method getAuthenticationMechanism (line 121) | private AuthenticationMechanism getAuthenticationMechanism() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoEditionPanel.java
class MongoEditionPanel (line 47) | public class MongoEditionPanel extends JPanel implements Disposable {
method MongoEditionPanel (line 57) | public MongoEditionPanel() {
method init (line 68) | public MongoEditionPanel init(final MongoPanel.MongoDocumentOperations...
method updateEditionTree (line 104) | public void updateEditionTree(DBObject mongoDocument) {
method buildPopupMenu (line 122) | void buildPopupMenu() {
method containsKey (line 133) | public boolean containsKey(String key) {
method addKey (line 153) | public void addKey(String key, Object value) {
method addValue (line 173) | public void addValue(Object value) {
method getParentNode (line 190) | private NoSqlTreeNode getParentNode() {
method getSelectedNode (line 198) | public NoSqlTreeNode getSelectedNode() {
method canAddKey (line 202) | public boolean canAddKey() {
method canAddValue (line 210) | public boolean canAddValue() {
method removeSelectedKey (line 218) | public void removeSelectedKey() {
method buildMongoDocument (line 227) | private DBObject buildMongoDocument() {
method dispose (line 232) | @Override
method getDocumentId (line 237) | private Object getDocumentId() {
method findObjectIdNodeDescriptor (line 243) | private NoSqlTreeNode findObjectIdNodeDescriptor(NoSqlTreeNode rootNod...
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoPanel.java
class MongoPanel (line 51) | public class MongoPanel extends NoSqlResultView<MongoCollection> {
method MongoPanel (line 67) | public MongoPanel(Project project, final MongoClient mongoClient, fina...
method initToolBar (line 108) | private void initToolBar() {
method createResultPanel (line 123) | private MongoResultPanel createResultPanel(Project project, MongoDocum...
method installResultPanelActions (line 128) | void installResultPanelActions() {
method getRecords (line 188) | public MongoCollection getRecords() {
method showResults (line 193) | public void showResults() {
method executeQuery (line 197) | public void executeQuery() {
method validateQuery (line 241) | private void validateQuery() {
method dispose (line 245) | @Override
method getResultPanel (line 250) | public MongoResultPanel getResultPanel() {
method openFindEditor (line 254) | public void openFindEditor() {
method closeFindEditor (line 265) | public void closeFindEditor() {
method focusOnEditor (line 270) | public void focusOnEditor() {
method isFindEditorOpened (line 274) | public boolean isFindEditorOpened() {
type MongoDocumentOperations (line 278) | interface MongoDocumentOperations {
method getMongoDocument (line 279) | DBObject getMongoDocument(Object _id);
method deleteMongoDocument (line 281) | void deleteMongoDocument(Object mongoDocument);
method updateMongoDocument (line 283) | void updateMongoDocument(DBObject mongoDocument);
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoResultPanel.java
class MongoResultPanel (line 52) | public class MongoResultPanel extends JPanel implements Disposable {
method MongoResultPanel (line 64) | public MongoResultPanel(Project project, MongoPanel.MongoDocumentOpera...
method createMongoEditionPanel (line 83) | private MongoEditionPanel createMongoEditionPanel() {
method updateResultTableTree (line 102) | public void updateResultTableTree(MongoResult mongoResult) {
method buildPopupMenu (line 123) | void buildPopupMenu() {
method editSelectedMongoDocument (line 134) | public void editSelectedMongoDocument() {
method addMongoDocument (line 148) | public void addMongoDocument() {
method getSelectedMongoDocument (line 153) | private DBObject getSelectedMongoDocument() {
method isSelectedNodeId (line 172) | public boolean isSelectedNodeId() {
method expandAll (line 192) | void expandAll() {
method collapseAll (line 196) | void collapseAll() {
method getSelectedNodeStringifiedValue (line 201) | public String getSelectedNodeStringifiedValue() {
method hideEditionPanel (line 214) | private void hideEditionPanel() {
method stringifyResult (line 218) | private String stringifyResult(DefaultMutableTreeNode selectedResultNo...
method dispose (line 228) | @Override
type ActionCallback (line 234) | public interface ActionCallback {
method onOperationSuccess (line 236) | void onOperationSuccess(String message);
method onOperationFailure (line 238) | void onOperationFailure(Exception exception);
method onOperationCancelled (line 240) | void onOperationCancelled(String message);
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/QueryPanel.java
class QueryPanel (line 51) | public class QueryPanel extends JPanel implements Disposable {
method QueryPanel (line 70) | public QueryPanel(Project project) {
method createAggregationPanel (line 90) | private OperatorPanel createAggregationPanel() {
method createFilterPanel (line 94) | private OperatorPanel createFilterPanel() {
method requestFocusOnEditor (line 98) | public void requestFocusOnEditor() {// Code from requestFocus of Edito...
method getCurrentOperatorPanel (line 106) | public OperatorPanel getCurrentOperatorPanel() {
method fillEditorSettings (line 111) | private static void fillEditorSettings(final EditorSettings editorSett...
method attachHighlighter (line 125) | private void attachHighlighter(final EditorEx editor) {
method createHighlighter (line 131) | private EditorHighlighter createHighlighter(EditorColorsScheme setting...
method getQueryOptions (line 139) | public MongoQueryOptions getQueryOptions(String rowLimit) {
method dispose (line 143) | @Override
method toggleToAggregation (line 150) | public void toggleToAggregation() {
method toggleToFind (line 154) | public void toggleToFind() {
method validateQuery (line 158) | public void validateQuery() {
class AggregatorPanel (line 162) | private class AggregatorPanel extends OperatorPanel {
method AggregatorPanel (line 167) | private AggregatorPanel() {
method validateQuery (line 183) | @Override
method getQuery (line 198) | private String getQuery() {
method buildQueryOptions (line 202) | @Override
method getRequestFocusComponent (line 218) | @Override
method dispose (line 223) | @Override
class FilterPanel (line 230) | private class FilterPanel extends OperatorPanel {
method FilterPanel (line 237) | private FilterPanel() {
method getRequestFocusComponent (line 251) | @Override
method validateQuery (line 256) | @Override
method buildQueryOptions (line 263) | @Override
method dispose (line 281) | @Override
method validateEditorQuery (line 289) | private void validateEditorQuery(Editor editor) {
method getQueryFrom (line 303) | private String getQueryFrom(Editor editor) {
method createSubOperatorPanel (line 307) | private JPanel createSubOperatorPanel(String title, Editor subOperat...
class OperatorPanel (line 322) | private abstract class OperatorPanel extends JPanel implements Disposa...
method getRequestFocusComponent (line 324) | public abstract JComponent getRequestFocusComponent();
method validateQuery (line 326) | public abstract void validateQuery();
method buildQueryOptions (line 328) | public abstract MongoQueryOptions buildQueryOptions(String rowLimit);
method notifyOnErrorForOperator (line 330) | void notifyOnErrorForOperator(JComponent component, Exception ex) {
method createEditor (line 350) | protected Editor createEditor() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/AddMongoDocumentAction.java
class AddMongoDocumentAction (line 27) | public class AddMongoDocumentAction extends AnAction implements DumbAware {
method AddMongoDocumentAction (line 31) | public AddMongoDocumentAction(MongoResultPanel resultPanel) {
method actionPerformed (line 37) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/CloseFindEditorAction.java
class CloseFindEditorAction (line 26) | public class CloseFindEditorAction extends CloseTabToolbarAction {
method CloseFindEditorAction (line 29) | public CloseFindEditorAction(MongoPanel mongoPanel) {
method actionPerformed (line 35) | @Override
method update (line 40) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/CopyResultAction.java
class CopyResultAction (line 30) | public class CopyResultAction extends AnAction implements DumbAware {
method CopyResultAction (line 34) | public CopyResultAction(MongoResultPanel mongoResultPanel) {
method actionPerformed (line 41) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/DropCollectionAction.java
class DropCollectionAction (line 27) | public class DropCollectionAction extends AnAction implements DumbAware {
method DropCollectionAction (line 33) | public DropCollectionAction(NoSqlExplorerPanel noSqlExplorerPanel) {
method actionPerformed (line 38) | @Override
method update (line 48) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/DropDatabaseAction.java
class DropDatabaseAction (line 30) | public class DropDatabaseAction extends AnAction implements DumbAware {
method DropDatabaseAction (line 36) | public DropDatabaseAction(NoSqlExplorerPanel noSqlExplorerPanel) {
method actionPerformed (line 41) | @Override
method update (line 51) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/EditMongoDocumentAction.java
class EditMongoDocumentAction (line 25) | public class EditMongoDocumentAction extends AnAction implements DumbAwa...
method EditMongoDocumentAction (line 29) | public EditMongoDocumentAction(MongoResultPanel resultPanel) {
method actionPerformed (line 34) | @Override
method update (line 39) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/EnableAggregateAction.java
class EnableAggregateAction (line 26) | public class EnableAggregateAction extends ToggleAction {
method EnableAggregateAction (line 38) | public EnableAggregateAction(final QueryPanel queryPanel) {
method isSelected (line 44) | @Override
method setSelected (line 49) | @Override
method update (line 59) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/OpenFindAction.java
class OpenFindAction (line 27) | public class OpenFindAction extends AnAction implements DumbAware {
method OpenFindAction (line 30) | public OpenFindAction(MongoPanel mongoPanel) {
method actionPerformed (line 37) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/OperatorCompletionAction.java
class OperatorCompletionAction (line 39) | public class OperatorCompletionAction extends AnAction implements Dispos...
method OperatorCompletionAction (line 68) | public OperatorCompletionAction(Project project, Editor editor) {
method actionPerformed (line 74) | @Override
method dispose (line 99) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/AddKeyAction.java
class AddKeyAction (line 27) | public class AddKeyAction extends AnAction {
method AddKeyAction (line 31) | public AddKeyAction(MongoEditionPanel mongoEditionPanel) {
method actionPerformed (line 37) | @Override
method update (line 49) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/AddValueAction.java
class AddValueAction (line 25) | public class AddValueAction extends AnAction {
method AddValueAction (line 29) | public AddValueAction(MongoEditionPanel mongoEditionPanel) {
method actionPerformed (line 34) | @Override
method update (line 46) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/DeleteKeyAction.java
class DeleteKeyAction (line 26) | public class DeleteKeyAction extends AnAction {
method DeleteKeyAction (line 30) | public DeleteKeyAction(MongoEditionPanel mongoEditionPanel) {
method actionPerformed (line 36) | @Override
method update (line 41) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/console/MongoConsoleRunner.java
class MongoConsoleRunner (line 43) | public class MongoConsoleRunner extends AbstractConsoleRunnerWithHistory...
method MongoConsoleRunner (line 50) | public MongoConsoleRunner(@NotNull Project project, ServerConfiguratio...
method createConsoleView (line 57) | @Override
method createProcess (line 68) | @Nullable
method createProcessHandler (line 119) | @Override
method createExecuteActionHandler (line 124) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/editor/MongoFakeFileType.java
class MongoFakeFileType (line 27) | public class MongoFakeFileType extends FakeFileType {
method getIcon (line 34) | @Override
method isMyFileType (line 39) | @Override
method getDefaultExtension (line 44) | @NotNull
method getName (line 50) | @NotNull
method getDescription (line 56) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/editor/MongoObjectFile.java
class MongoObjectFile (line 26) | public class MongoObjectFile extends NoSqlDatabaseObjectFile {
method MongoObjectFile (line 30) | public MongoObjectFile(Project project, ServerConfiguration configurat...
method getFileType (line 36) | @NotNull
method getCollection (line 42) | public MongoCollection getCollection() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/model/JsonTreeModel.java
class JsonTreeModel (line 35) | public class JsonTreeModel extends DefaultTreeModel {
method JsonTreeModel (line 38) | public JsonTreeModel(MongoResult mongoResult) {
method buildJsonTree (line 43) | public static TreeNode buildJsonTree(MongoResult mongoResult) {
method buildJsonTree (line 60) | public static TreeNode buildJsonTree(DBObject mongoObject) {
method processDbObject (line 66) | public static void processDbObject(NoSqlTreeNode parentNode, DBObject ...
method buildDBObject (line 90) | public static DBObject buildDBObject(NoSqlTreeNode rootNode) {
method buildDBList (line 111) | private static DBObject buildDBList(NoSqlTreeNode parentNode) {
method findObjectIdNode (line 131) | public static NoSqlTreeNode findObjectIdNode(NoSqlTreeNode treeNode) {
method findDocument (line 154) | public static Object findDocument(NoSqlTreeNode startingNode) {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoKeyValueDescriptor.java
class MongoKeyValueDescriptor (line 33) | public class MongoKeyValueDescriptor implements NodeDescriptor {
method createDescriptor (line 42) | public static MongoKeyValueDescriptor createDescriptor(String key, Obj...
method MongoKeyValueDescriptor (line 88) | private MongoKeyValueDescriptor(String key, Object value, SimpleTextAt...
method renderValue (line 94) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 100) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 104) | public String getFormattedKey() {
method getFormattedValue (line 108) | public String getFormattedValue() {
method getKey (line 112) | public String getKey() {
method getValue (line 116) | public Object getValue() {
method setValue (line 120) | public void setValue(Object value) {
method toString (line 124) | @Override
method getValueAndAbbreviateIfNecessary (line 129) | protected String getValueAndAbbreviateIfNecessary() {
class MongoKeyNullValueDescriptor (line 137) | private static class MongoKeyNullValueDescriptor extends MongoKeyValue...
method MongoKeyNullValueDescriptor (line 139) | private MongoKeyNullValueDescriptor(String key) {
method getValueAndAbbreviateIfNecessary (line 143) | protected String getValueAndAbbreviateIfNecessary() {
class MongoKeyStringValueDescriptor (line 148) | private static class MongoKeyStringValueDescriptor extends MongoKeyVal...
method MongoKeyStringValueDescriptor (line 153) | private MongoKeyStringValueDescriptor(String key, String value) {
method getValueAndAbbreviateIfNecessary (line 157) | @Override
method toString (line 162) | @Override
class MongoKeyDateValueDescriptor (line 168) | private static class MongoKeyDateValueDescriptor extends MongoKeyValue...
method MongoKeyDateValueDescriptor (line 174) | private MongoKeyDateValueDescriptor(String key, Date value) {
method getValueAndAbbreviateIfNecessary (line 178) | @Override
method toString (line 183) | @Override
method getFormattedDate (line 188) | private String getFormattedDate() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoResultDescriptor.java
class MongoResultDescriptor (line 23) | public class MongoResultDescriptor implements NodeDescriptor {
method MongoResultDescriptor (line 27) | public MongoResultDescriptor(String collectionName) {
method MongoResultDescriptor (line 31) | public MongoResultDescriptor() {
method renderValue (line 35) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 38) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 42) | public String getFormattedKey() {
method getFormattedValue (line 46) | @Override
method getValue (line 51) | @Override
method setValue (line 56) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoValueDescriptor.java
class MongoValueDescriptor (line 32) | public class MongoValueDescriptor implements NodeDescriptor {
method createDescriptor (line 38) | public static MongoValueDescriptor createDescriptor(int index, Object ...
method MongoValueDescriptor (line 68) | private MongoValueDescriptor(int index, Object value, SimpleTextAttrib...
method renderValue (line 74) | public void renderValue(ColoredTableCellRenderer cellRenderer, boolean...
method renderNode (line 80) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 84) | public String getFormattedKey() {
method getFormattedValue (line 88) | public String getFormattedValue() {
method getValueAndAbbreviateIfNecessary (line 92) | protected String getValueAndAbbreviateIfNecessary() {
method getValue (line 100) | public Object getValue() {
method setValue (line 104) | public void setValue(Object value) {
method toString (line 108) | @Override
class MongoStringValueDescriptor (line 113) | private static class MongoStringValueDescriptor extends MongoValueDesc...
method MongoStringValueDescriptor (line 115) | private MongoStringValueDescriptor(int index, String value) {
method getFormattedValue (line 119) | @Override
class MongoNullValueDescriptor (line 125) | private static class MongoNullValueDescriptor extends MongoValueDescri...
method MongoNullValueDescriptor (line 127) | private MongoNullValueDescriptor(int index) {
method getFormattedValue (line 131) | @Override
method toString (line 136) | @Override
class MongoDateValueDescriptor (line 142) | private static class MongoDateValueDescriptor extends MongoValueDescri...
method MongoDateValueDescriptor (line 148) | private MongoDateValueDescriptor(int index, Date value) {
method getValueAndAbbreviateIfNecessary (line 152) | @Override
method toString (line 157) | @Override
method getFormattedDate (line 162) | private String getFormattedDate() {
FILE: src/main/java/org/codinjutsu/tools/nosql/mongo/view/table/MongoDatePickerCellEditor.java
class MongoDatePickerCellEditor (line 27) | public class MongoDatePickerCellEditor extends DatePickerCellEditor {
method MongoDatePickerCellEditor (line 29) | public MongoDatePickerCellEditor() {
method addActionListener (line 36) | public void addActionListener(ActionListener actionListener) {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/RedisUI.java
class RedisUI (line 29) | public class RedisUI implements DatabaseUI {
method createAythenticationView (line 30) | @Override
method createResultPanel (line 35) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/RedisUtils.java
class RedisUtils (line 28) | public class RedisUtils {
method stringifySortedSet (line 30) | public static String stringifySortedSet(Set<Tuple> sortedSet) {
method stringifySet (line 39) | public static String stringifySet(Set set) {
method stringifyTuple (line 44) | public static String stringifyTuple(Tuple tuple) {
method buildUrl (line 48) | public static String buildUrl(ServerConfiguration serverConfiguration,...
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/logic/RedisClient.java
class RedisClient (line 40) | public class RedisClient implements DatabaseClient {
method getInstance (line 42) | public static RedisClient getInstance(Project project) {
method connect (line 47) | @Override
method loadServer (line 59) | @Override
method cleanUpServers (line 76) | @Override
method registerServer (line 81) | @Override
method defaultConfiguration (line 86) | @Override
method loadRecords (line 96) | public RedisResult loadRecords(ServerConfiguration serverConfiguration...
method createJedis (line 126) | private Jedis createJedis(ServerConfiguration serverConfiguration) {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisDatabase.java
class RedisDatabase (line 21) | public class RedisDatabase extends Database {
method RedisDatabase (line 24) | public RedisDatabase(String name) {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisKeyType.java
type RedisKeyType (line 21) | public enum RedisKeyType {
method RedisKeyType (line 26) | RedisKeyType(String label) {
method getKeyType (line 30) | public static RedisKeyType getKeyType(String type) {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisQuery.java
class RedisQuery (line 19) | public class RedisQuery {
method RedisQuery (line 23) | public RedisQuery(String filter) {
method getFilter (line 27) | public String getFilter() {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisRecord.java
class RedisRecord (line 19) | public class RedisRecord<T> {
method RedisRecord (line 24) | public RedisRecord(RedisKeyType keyType, String keyName, T keyValue) {
method getKeyType (line 30) | public RedisKeyType getKeyType() {
method getKey (line 34) | public String getKey() {
method getValue (line 38) | public T getValue() {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisResult.java
class RedisResult (line 26) | public class RedisResult {
method addString (line 31) | public void addString(String key, String value) {
method addList (line 35) | public void addList(String key, List values) {
method addSet (line 39) | public void addSet(String key, Set values) {
method addHash (line 43) | public void addHash(String key, Map values) {
method addSortedSet (line 47) | public void addSortedSet(String key, Set<Tuple> values) {
method getResults (line 51) | public List<RedisRecord> getResults() {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisAuthenticationPanel.java
class RedisAuthenticationPanel (line 24) | public class RedisAuthenticationPanel implements AuthenticationView {
method RedisAuthenticationPanel (line 29) | public RedisAuthenticationPanel() {
method getComponent (line 33) | @Override
method create (line 38) | @Override
method load (line 45) | @Override
method getPassword (line 50) | private String getPassword() {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisFragmentedKeyTreeModel.java
class RedisFragmentedKeyTreeModel (line 34) | public class RedisFragmentedKeyTreeModel extends DefaultTreeModel {
method RedisFragmentedKeyTreeModel (line 41) | public RedisFragmentedKeyTreeModel(NoSqlTreeNode root) {
method setSeparator (line 46) | public void setSeparator(String separator) {
method resetSeparator (line 52) | public void resetSeparator() {
method getRoot (line 58) | @Override
method reload (line 63) | @Override
method getChildCount (line 71) | @Override
method getChild (line 76) | @Override
method getIndexOfChild (line 81) | @Override
method addTreeModelListener (line 86) | @Override
method removeTreeModelListener (line 92) | @Override
method isLeaf (line 98) | @Override
method getFragmentedKeyModel (line 103) | private DefaultTreeModel getFragmentedKeyModel() {
method updateFilteredModel (line 111) | private void updateFilteredModel() {
method fireSeparatorChanged (line 125) | private void fireSeparatorChanged() {
method wrapNodes (line 129) | public static DefaultMutableTreeNode wrapNodes(DefaultMutableTreeNode ...
method updateTree (line 149) | private static void updateTree(DefaultMutableTreeNode parentTargetNode...
method findNodeByKey (line 168) | private static NoSqlTreeNode findNodeByKey(DefaultMutableTreeNode pare...
method addChildren (line 187) | private static void addChildren(DefaultMutableTreeNode parentNode, Def...
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisPanel.java
class RedisPanel (line 55) | public class RedisPanel extends NoSqlResultView<RedisResult> {
method RedisPanel (line 76) | public RedisPanel(Project project, RedisClient redisClient, ServerConf...
method loadAndDisplayResults (line 95) | private void loadAndDisplayResults(final String filter, final boolean ...
method buildQueryToolBar (line 100) | protected void buildQueryToolBar() {
method addCommonsActions (line 119) | protected void addCommonsActions() {
method getFilter (line 173) | private String getFilter() {
method expandAll (line 181) | void expandAll() {
method collapseAll (line 185) | void collapseAll() {
method updateResultTableTree (line 190) | public void updateResultTableTree(RedisResult redisResult, boolean gro...
method showResults (line 205) | @Override
method getResultPanel (line 210) | @Override
method getRecords (line 215) | @Override
method executeQuery (line 220) | @Override
method dispose (line 260) | @Override
method isGroupDataEnabled (line 265) | public boolean isGroupDataEnabled() {
method toggleGroupData (line 269) | public void toggleGroupData(boolean enabled) {
method getGroupSeparator (line 274) | public String getGroupSeparator() {
method setGroupSeparator (line 278) | public void setGroupSeparator(String groupSeparator) {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisTreeModel.java
class RedisTreeModel (line 31) | public class RedisTreeModel {
method buildTree (line 32) | public static NoSqlTreeNode buildTree(RedisResult redisResult) {
method processRecord (line 43) | private static void processRecord(NoSqlTreeNode rootNode, RedisRecord ...
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/action/EnableGroupingAction.java
class EnableGroupingAction (line 24) | public class EnableGroupingAction extends ToggleAction {
method EnableGroupingAction (line 31) | public EnableGroupingAction(RedisPanel redisPanel) {
method isSelected (line 36) | @Override
method setSelected (line 41) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/action/SetSeparatorAction.java
class SetSeparatorAction (line 30) | public class SetSeparatorAction extends AnAction {
method SetSeparatorAction (line 37) | public SetSeparatorAction(RedisPanel redisPanel) {
method actionPerformed (line 44) | @Override
method update (line 66) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/console/RedisConsoleRunner.java
class RedisConsoleRunner (line 39) | public class RedisConsoleRunner extends AbstractConsoleRunnerWithHistory...
method RedisConsoleRunner (line 46) | public RedisConsoleRunner(@NotNull Project project, ServerConfiguratio...
method createConsoleView (line 53) | @Override
method createProcess (line 64) | @Nullable
method createProcessHandler (line 89) | @Override
method createExecuteActionHandler (line 94) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/editor/RedisFakeFileType.java
class RedisFakeFileType (line 27) | public class RedisFakeFileType extends FakeFileType {
method getIcon (line 33) | @Override
method isMyFileType (line 38) | @Override
method getDefaultExtension (line 43) | @NotNull
method getName (line 49) | @NotNull
method getDescription (line 55) | @NotNull
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/editor/RedisObjectFile.java
class RedisObjectFile (line 26) | public class RedisObjectFile extends NoSqlDatabaseObjectFile {
method RedisObjectFile (line 29) | public RedisObjectFile(Project project, ServerConfiguration configurat...
method getFileType (line 34) | @NotNull
method getDatabase (line 39) | public RedisDatabase getDatabase() {
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/FragmentedKeyNodeDescriptor.java
class FragmentedKeyNodeDescriptor (line 26) | public class FragmentedKeyNodeDescriptor implements NodeDescriptor {
method FragmentedKeyNodeDescriptor (line 31) | public FragmentedKeyNodeDescriptor(String keyFragment, SimpleTextAttri...
method createDescriptor (line 36) | public static FragmentedKeyNodeDescriptor createDescriptor(String key) {
method getKeyFragment (line 40) | public String getKeyFragment() {
method renderValue (line 44) | @Override
method renderNode (line 49) | @Override
method getFormattedKey (line 55) | @Override
method getFormattedValue (line 60) | @Override
method getValue (line 65) | @Override
method setValue (line 70) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisKeyValueDescriptor.java
class RedisKeyValueDescriptor (line 35) | public class RedisKeyValueDescriptor implements NodeDescriptor {
method createDescriptor (line 45) | public static RedisKeyValueDescriptor createDescriptor(RedisKeyType ke...
method createDescriptor (line 49) | public static NodeDescriptor createDescriptor(String key, String value) {
method RedisKeyValueDescriptor (line 53) | public RedisKeyValueDescriptor(RedisKeyType keyType, String key, Objec...
method findIcon (line 61) | private Icon findIcon(Object object) {
method renderValue (line 71) | @Override
method renderNode (line 78) | public void renderNode(ColoredTreeCellRenderer cellRenderer) {
method getFormattedKey (line 87) | @Override
method getFormattedValue (line 92) | @Override
method getValue (line 102) | @Override
method setValue (line 107) | @Override
method getKey (line 112) | public String getKey() {
method getKeyType (line 116) | public RedisKeyType getKeyType() {
method getValueAndAbbreviateIfNecessary (line 120) | protected String getValueAndAbbreviateIfNecessary(String stringifiedVa...
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisResultDescriptor.java
class RedisResultDescriptor (line 24) | public class RedisResultDescriptor implements NodeDescriptor {
method renderValue (line 25) | @Override
method renderNode (line 30) | @Override
method getFormattedKey (line 35) | @Override
method getFormattedValue (line 40) | @Override
method getValue (line 45) | @Override
method setValue (line 50) | @Override
FILE: src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisValueDescriptor.java
class RedisValueDescriptor (line 26) | public class RedisValueDescriptor implements NodeDescriptor {
method createDescriptor (line 32) | public static RedisValueDescriptor createDescriptor(int index, Object ...
method createUnindexedDescriptor (line 36) | public static RedisValueDescriptor createUnindexedDescriptor(Object va...
method RedisValueDescriptor (line 40) | private RedisValueDescriptor(int index, Object value, SimpleTextAttrib...
method renderValue (line 47) | @Override
method renderNode (line 54) | @Override
method getFormattedKey (line 59) | @Override
method getFormattedValue (line 64) | @Override
method getValue (line 73) | @Override
method setValue (line 78) | @Override
class RedisUnindexedValueDescriptor (line 83) | private static class RedisUnindexedValueDescriptor extends RedisValueD...
method RedisUnindexedValueDescriptor (line 85) | private RedisUnindexedValueDescriptor(Object value, SimpleTextAttrib...
method getFormattedKey (line 89) | @Override
FILE: src/test/java/org/codinjutsu/tools/nosql/commons/utils/DateUtilsTest.java
class DateUtilsTest (line 28) | public class DateUtilsTest {
method testUtcDateTime (line 30) | @Test
method testUtcTime (line 45) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/commons/utils/StringUtilsTest.java
class StringUtilsTest (line 23) | public class StringUtilsTest {
method abbreviateInCenter (line 25) | @Test
method parseNumber (line 32) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/commons/view/TableCellReader.java
class TableCellReader (line 24) | public class TableCellReader extends BasicJTableCellReader {
method valueAt (line 26) | @Override
FILE: src/test/java/org/codinjutsu/tools/nosql/couchbase/CouchbaseClientTest.java
class CouchbaseClientTest (line 38) | public class CouchbaseClientTest {
method loadServers (line 39) | @Test
method main (line 52) | public static void main(String[] args) {
FILE: src/test/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbasePanelTest.java
class CouchbasePanelTest (line 41) | public class CouchbasePanelTest {
method setUp (line 48) | @Before
method tearDown (line 69) | @After
method displayJsonObjects (line 74) | @Test
method createResults (line 108) | private CouchbaseResult createResults() {
FILE: src/test/java/org/codinjutsu/tools/nosql/couchbase/view/ServerConfigurationPanelTest.java
class ServerConfigurationPanelTest (line 39) | public class ServerConfigurationPanelTest {
method setUp (line 49) | @Before
method tearDown (line 65) | @After
method createCouchbaseConfiguration (line 70) | @Test
method loadCouchbaseConfiguration (line 100) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientTest.java
class MongoClientTest (line 39) | public class MongoClientTest {
method loadCollectionsWithEmptyFilter (line 45) | @Test
method loadCollectionsWithFilterAndProjection (line 54) | @Test
method loadCollectionsWithFilterAndProjectionAndSortByPrice (line 66) | @Test
method updateMongoDocument (line 79) | @Test
method deleteMongoDocument (line 100) | @Test
method loadCollectionsWithAggregateOperators (line 117) | @Test
method setUp (line 131) | @Before
method fillCollectionWithJsonData (line 145) | private static void fillCollectionWithJsonData(com.mongodb.client.Mong...
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientURIBuilderTest.java
class MongoClientURIBuilderTest (line 25) | public class MongoClientURIBuilderTest {
method withoutAuthentication (line 27) | @Test
method withSimpleAuthentication (line 36) | @Test
method withSpecificAuthentication (line 46) | @Test
method addSslOption (line 57) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/view/MongoEditionPanelTest.java
class MongoEditionPanelTest (line 43) | public class MongoEditionPanelTest {
method tearDown (line 51) | @After
method setUp (line 56) | @Before
method displayMongoDocumentInTheTreeTable (line 75) | @Test
method editKeyWithStringValue (line 87) | @Test
method cancelEdition (line 105) | @Test
method addKeyWithSomeValue (line 118) | @Test
method addValueInAList (line 139) | @Test
class JsonTableCellReader (line 175) | private static class JsonTableCellReader extends BasicJTableCellReader {
method valueAt (line 177) | @Override
method buildDocument (line 190) | private DBObject buildDocument(String jsonFile) throws IOException {
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/view/MongoResultPanelTest.java
class MongoResultPanelTest (line 40) | public class MongoResultPanelTest {
method tearDown (line 49) | @After
method setUp (line 54) | @Before
method displayTreeWithASimpleArray (line 71) | @Test
method testDisplayTreeWithASimpleDocument (line 85) | @Test
method testDisplayTreeWithAStructuredDocument (line 101) | @Test
method testDisplayTreeWithAnArrayOfStructuredDocument (line 123) | @Test
method testCopyMongoObjectNodeValue (line 156) | @Test
method copyMongoResults (line 171) | @Test
method createCollectionResults (line 210) | private MongoResult createCollectionResults(String data, String collec...
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/view/ServerConfigurationPanelTest.java
class ServerConfigurationPanelTest (line 39) | public class ServerConfigurationPanelTest {
method setUp (line 49) | @Before
method tearDown (line 65) | @After
method createMongoConfiguration (line 70) | @Test
method loadMongoConfiguration (line 108) | @Test
method validateFormWithEmptyLabelShouldReturnAValidationInfo (line 139) | @Test
method validateFormWithMissingMongoUrlShouldThrowAConfigurationException (line 144) | @Test
method validateFormWithEmptyMongoUrlShouldReturnAValidationInfo (line 152) | @Test
method validateFormWithBadMongoUrlShouldReturnAValidationInfo (line 161) | @Test
method validateFormWithBadMongoPortShouldThrowAConfigurationException (line 171) | @Test
method validateFormWithReplicatSet (line 183) | @Test
method loadFormWithReplicatSet (line 195) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/mongo/view/model/JsonTreeModelTest.java
class JsonTreeModelTest (line 30) | public class JsonTreeModelTest {
method buildDBObjectFromSimpleTree (line 32) | @Test
method buildDBObjectFromTreeWithSubNodes (line 50) | @Test
method buildDBObjectFromTreeWithSubList (line 70) | @Test
method getObjectIdFromANode (line 88) | @Test
method findDocumentFromANode (line 102) | @Test
FILE: src/test/java/org/codinjutsu/tools/nosql/redis/logic/RedisClientTest.java
class RedisClientTest (line 30) | public class RedisClientTest {
method loadWithEmptyFilter (line 34) | @Test
method loadWithFilter (line 67) | @Test
method setUp (line 91) | @Before
method tearDown (line 99) | public void tearDown() throws Exception {
FILE: src/test/java/org/codinjutsu/tools/nosql/redis/view/RedisPanelTest.java
class RedisPanelTest (line 43) | public class RedisPanelTest {
method tearDown (line 53) | @After
method setUp (line 58) | @Before
method displayTreeWithEachSupportedKeyType (line 74) | @Test
method testDisplayTreeWithFragmentedKey (line 102) | @Test
method createRedisResults (line 137) | private RedisResult createRedisResults() {
FILE: src/test/java/org/codinjutsu/tools/nosql/redis/view/ServerConfigurationPanelTest.java
class ServerConfigurationPanelTest (line 40) | public class ServerConfigurationPanelTest {
method setUp (line 50) | @Before
method tearDown (line 66) | @After
method createRedisConfiguration (line 71) | @Test
method loadRedisConfiguration (line 99) | @Test
Condensed preview — 175 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (609K chars).
[
{
"path": ".gitignore",
"chars": 26,
"preview": "*.iml\n*.ipr\n*.iws\ntarget/\n"
},
{
"path": "CHANGELOG.txt",
"chars": 254,
"preview": "0.1.0 - Initial version\n * RedisDB: view database content with filter (KEYS instruction is temporary used) and group wi"
},
{
"path": "LICENSE.txt",
"chars": 11323,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "README.md",
"chars": 3057,
"preview": "# NoSql Plugin for IntelliJ IDEA version 0.1.0-SNAPSHOT\n\n## Description\nThis plugin is a fork from [mongo4idea](https://"
},
{
"path": "fetchIdea.sh",
"chars": 972,
"preview": "#!/usr/bin/env bash\n# original file from https://github.com/go-lang-plugin-org/go-lang-idea-plugin\n# thanks zolotov :)\n\n"
},
{
"path": "nosql4idea.iml.template",
"chars": 4892,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<module type=\"PLUGIN_MODULE\" version=\"4\">\r\n <component name=\"DevKit.ModuleBuild"
},
{
"path": "pom.xml",
"chars": 9441,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/ConfigurationDialog.java",
"chars": 2194,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/DatabaseVendor.java",
"chars": 1574,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorClientManager.java",
"chars": 2501,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/DatabaseVendorUIManager.java",
"chars": 2271,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlComponent.java",
"chars": 1289,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlConfigurable.java",
"chars": 17747,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlConfiguration.java",
"chars": 2657,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlExplorerPanel.form",
"chars": 1652,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlExplorerPanel.java",
"chars": 18404,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlServerTableModel.java",
"chars": 3362,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlTreeRenderer.java",
"chars": 2716,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/NoSqlWindowManager.java",
"chars": 2783,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/SelectDatabaseVendorDialog.form",
"chars": 1542,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/SelectDatabaseVendorDialog.java",
"chars": 2139,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/ServerConfiguration.java",
"chars": 4730,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/DatabaseUI.java",
"chars": 1080,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/logic/ConfigurationException.java",
"chars": 877,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/logic/DatabaseClient.java",
"chars": 1057,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/model/AuthenticationSettings.java",
"chars": 2159,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/model/Database.java",
"chars": 839,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/model/DatabaseServer.java",
"chars": 1783,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/style/StyleAttributesProvider.java",
"chars": 2867,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/utils/DateUtils.java",
"chars": 1235,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/utils/GuiUtils.java",
"chars": 3986,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/utils/StringUtils.java",
"chars": 1734,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/AuthenticationView.java",
"chars": 905,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/ErrorPanel.java",
"chars": 1811,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlResultView.java",
"chars": 965,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/NoSqlTreeNode.java",
"chars": 1052,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanel.form",
"chars": 9006,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanel.java",
"chars": 10252,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/ServerConfigurationPanelFactory.java",
"chars": 1880,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ExecuteQuery.java",
"chars": 1566,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/action/NoSqlDatabaseConsoleAction.java",
"chars": 3923,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/action/OpenPluginSettingsAction.java",
"chars": 1761,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/action/RefreshServerAction.java",
"chars": 2440,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/action/ViewCollectionValuesAction.java",
"chars": 1766,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/console/NoSqlConsoleView.java",
"chars": 1179,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditor.java",
"chars": 3485,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseDataEditorProvider.java",
"chars": 3001,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseFileSystem.java",
"chars": 3734,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/editor/NoSqlDatabaseObjectFile.java",
"chars": 3274,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/nodedescriptor/NodeDescriptor.java",
"chars": 1098,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/KeyCellRenderer.java",
"chars": 1268,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/renderer/ValueCellRenderer.java",
"chars": 1449,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/table/CellEditor.java",
"chars": 1525,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/commons/view/table/DateTimePicker.java",
"chars": 6342,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/CouchbaseUI.java",
"chars": 1791,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/logic/CouchbaseClient.java",
"chars": 6231,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseDatabase.java",
"chars": 839,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseQuery.java",
"chars": 849,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/model/CouchbaseResult.java",
"chars": 1513,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbaseAuthenticationPanel.java",
"chars": 2204,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbasePanel.form",
"chars": 1893,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbasePanel.java",
"chars": 8921,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbaseTreeModel.java",
"chars": 2939,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/couchbaseAuthenticationPanel.form",
"chars": 2375,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/editor/CouchbaseFakeFileType.java",
"chars": 1636,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/editor/CouchbaseObjectFile.java",
"chars": 1586,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseKeyValueDescriptor.java",
"chars": 4753,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseResultDescriptor.java",
"chars": 1631,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/couchbase/view/nodedescriptor/CouchbaseValueDescriptor.java",
"chars": 3286,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/MongoUI.java",
"chars": 1771,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/MongoUtils.java",
"chars": 1061,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClient.java",
"chars": 12393,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientURIBuilder.java",
"chars": 3373,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoConnectionException.java",
"chars": 881,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/logic/MongoExtraSettings.java",
"chars": 2305,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/JsonDataType.java",
"chars": 932,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoAggregateOperator.java",
"chars": 1125,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoCollection.java",
"chars": 1261,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoDatabase.java",
"chars": 1254,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoQueryOptions.java",
"chars": 2462,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/MongoResult.java",
"chars": 1227,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/model/OperatorValueConverter.java",
"chars": 1520,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoCommandLineState.java",
"chars": 2965,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfiguration.java",
"chars": 6178,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfigurationEditor.form",
"chars": 5124,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfigurationEditor.java",
"chars": 6823,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoRunConfigurationType.java",
"chars": 2123,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/runner/MongoScriptRunConfigurationProducer.java",
"chars": 2704,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/AbstractAddDialog.java",
"chars": 7174,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddKeyDialog.form",
"chars": 3143,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddKeyDialog.java",
"chars": 2756,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddValueDialog.form",
"chars": 2401,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/AddValueDialog.java",
"chars": 2143,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/JsonTreeTableView.java",
"chars": 7293,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoAuthenticationPanel.form",
"chars": 5978,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoAuthenticationPanel.java",
"chars": 5045,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoEditionPanel.form",
"chars": 3289,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoEditionPanel.java",
"chars": 8968,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoPanel.form",
"chars": 2535,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoPanel.java",
"chars": 10403,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoResultPanel.form",
"chars": 1133,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/MongoResultPanel.java",
"chars": 8785,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/QueryPanel.form",
"chars": 1132,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/QueryPanel.java",
"chars": 13569,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/AddMongoDocumentAction.java",
"chars": 1462,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/CloseFindEditorAction.java",
"chars": 1473,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/CopyResultAction.java",
"chars": 1715,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/DropCollectionAction.java",
"chars": 1911,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/DropDatabaseAction.java",
"chars": 1950,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/EditMongoDocumentAction.java",
"chars": 1528,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/EnableAggregateAction.java",
"chars": 2464,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/OpenFindAction.java",
"chars": 1523,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/OperatorCompletionAction.java",
"chars": 3963,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/AddKeyAction.java",
"chars": 1806,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/AddValueAction.java",
"chars": 1678,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/action/edition/DeleteKeyAction.java",
"chars": 1601,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/console/MongoConsoleRunner.java",
"chars": 5673,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/editor/MongoFakeFileType.java",
"chars": 1587,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/editor/MongoObjectFile.java",
"chars": 1575,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/model/JsonTreeModel.java",
"chars": 6758,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoKeyValueDescriptor.java",
"chars": 6934,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoResultDescriptor.java",
"chars": 1615,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/nodedescriptor/MongoValueDescriptor.java",
"chars": 5697,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/mongo/view/table/MongoDatePickerCellEditor.java",
"chars": 1429,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/RedisUI.java",
"chars": 1719,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/RedisUtils.java",
"chars": 1709,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/logic/RedisClient.java",
"chars": 5390,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisDatabase.java",
"chars": 828,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisKeyType.java",
"chars": 1163,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisQuery.java",
"chars": 846,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisRecord.java",
"chars": 1156,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/model/RedisResult.java",
"chars": 1690,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisAuthenticationPanel.form",
"chars": 1600,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisAuthenticationPanel.java",
"chars": 1747,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisFragmentedKeyTreeModel.java",
"chars": 7400,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisPanel.form",
"chars": 2039,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisPanel.java",
"chars": 10209,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/RedisTreeModel.java",
"chars": 3019,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/action/EnableGroupingAction.java",
"chars": 1455,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/action/SetSeparatorAction.java",
"chars": 2599,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/console/RedisConsoleRunner.java",
"chars": 4170,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/editor/RedisFakeFileType.java",
"chars": 1584,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/editor/RedisObjectFile.java",
"chars": 1533,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/FragmentedKeyNodeDescriptor.java",
"chars": 2216,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisKeyValueDescriptor.java",
"chars": 4203,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisResultDescriptor.java",
"chars": 1409,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/java/org/codinjutsu/tools/nosql/redis/view/nodedescriptor/RedisValueDescriptor.java",
"chars": 3087,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/main/resources/META-INF/plugin.xml",
"chars": 5314,
"preview": "<!--\n ~ Copyright (c) 2015 David Boissier\n ~\n ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n ~ y"
},
{
"path": "src/main/resources/assemblies/plugin-assembly.xml",
"chars": 1868,
"preview": "<!--\n ~ Copyright (c) 2013 David Boissier\n ~\n ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n ~ y"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/commons/utils/DateUtilsTest.java",
"chars": 2040,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/commons/utils/StringUtilsTest.java",
"chars": 1334,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/commons/view/TableCellReader.java",
"chars": 1183,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/couchbase/CouchbaseClientTest.java",
"chars": 3751,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/couchbase/view/CouchbasePanelTest.java",
"chars": 5620,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/couchbase/view/ServerConfigurationPanelTest.java",
"chars": 4968,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientTest.java",
"chars": 7926,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/logic/MongoClientURIBuilderTest.java",
"chars": 2414,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/view/MongoEditionPanelTest.java",
"chars": 7606,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/view/MongoResultPanelTest.java",
"chars": 10192,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/view/ServerConfigurationPanelTest.java",
"chars": 8557,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/mongo/view/model/JsonTreeModelTest.java",
"chars": 5324,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/redis/logic/RedisClientTest.java",
"chars": 3945,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/redis/view/RedisPanelTest.java",
"chars": 6293,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/java/org/codinjutsu/tools/nosql/redis/view/ServerConfigurationPanelTest.java",
"chars": 4747,
"preview": "/*\n * Copyright (c) 2015 David Boissier\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/logic/dummyCollection.json",
"chars": 417,
"preview": "[\n {\n \"label\":\"tata\",\n \"comment\":\"prout\",\n \"price\":15\n },\n {\n \"label\":\"tata\",\n "
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/arrayOfDocuments.json",
"chars": 459,
"preview": "[\n {\n \"id\":0,\n \"label\":\"toto\",\n \"visible\":false,\n \"doc\":{\n \"title\":\"hello\",\n "
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/model/arrayOfDocuments.json",
"chars": 525,
"preview": "[\n {\n \"_id\": \"50b8d63414f85401b9268b99\",\n \"label\": \"toto\",\n \"visible\": false,\n \"doc\": {\n "
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/model/simpleDocument.json",
"chars": 100,
"preview": "{\n \"_id\": \"50b8d63414f85401b9268b99\",\n \"label\":\"toto\",\n \"visible\":false,\n \"image\":null\n}"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/model/simpleDocumentWithInnerNodes.json",
"chars": 208,
"preview": "{\n \"_id\": \"50b8d63414f85401b9268b99\",\n \"label\": \"toto\",\n \"visible\": false,\n \"image\": null,\n \"innerdoc\": {"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/model/simpleDocumentWithSubList.json",
"chars": 306,
"preview": "{\n \"_id\": {\n \"$oid\": \"50b8d63414f85401b9268b99\"\n },\n \"title\": \"XP by example\",\n \"tags\": [ \"pair progr"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/simpleArray.json",
"chars": 31,
"preview": "[\n \"toto\", true, 10, null\n]\n"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/simpleDocument.json",
"chars": 100,
"preview": "{\n \"_id\": \"50b8d63414f85401b9268b99\",\n \"label\":\"toto\",\n \"visible\":false,\n \"image\":null\n}"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/simpleDocumentForEdition.json",
"chars": 100,
"preview": "{\n \"_id\": \"50b8d63414f85401b9268b99\",\n \"label\":\"toto\",\n \"visible\":false,\n \"image\":null\n}"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/simpleDocumentWithSubList.json",
"chars": 306,
"preview": "{\n \"_id\": {\n \"$oid\": \"50b8d63414f85401b9268b99\"\n },\n \"title\": \"XP by example\",\n \"tags\": [ \"pair progr"
},
{
"path": "src/test/resources/org/codinjutsu/tools/nosql/mongo/view/structuredDocument.json",
"chars": 180,
"preview": "{\n \"id\":0,\n \"label\":\"toto\",\n \"visible\":false,\n \"doc\":{\n \"title\":\"hello\",\n \"nbPages\":10,\n "
}
]
About this extraction
This page contains the full source code of the dboissier/nosql4idea GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 175 files (554.1 KB), approximately 127.8k tokens, and a symbol index with 1127 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.