Added missing license headers

This commit is contained in:
Rohit Awate 2018-06-23 23:24:20 +05:30
parent 3180c22949
commit 92e8066607
No known key found for this signature in database
GPG key ID: 1051D7B79CF2EE25
8 changed files with 135 additions and 10 deletions

View file

@ -66,7 +66,7 @@ Everest uses Maven, so building from the source code is very simple. You need to
1. Clone the repository: `git clone https://github.com/RohitAwate/Everest.git`
2. Enter the repository: `cd Everest`
3. Build a binary: `mvn package`
4. Run the binary: `java -jar target\Everest-Alpha-1.X.jar` replacing 'X' with the current version.
4. Run the binary: `java -jar target/Everest-Alpha-1.X.jar` replacing 'X' with the current version.
# Suggestions and improvements
Use these options to reach me:

View file

@ -210,7 +210,7 @@ public class DashboardController implements Initializable {
}
try {
String address = addressField.getText();
String address = addressField.getText().trim();
if (address.equals("")) {
promptLayer.setVisible(true);
@ -221,10 +221,12 @@ public class DashboardController implements Initializable {
// Prepends "https://" to the address if not already done.
if (!(address.startsWith("https://") || address.startsWith("http://"))) {
address = "https://" + address;
addressField.setText(address);
responseArea.requestFocus();
}
// Set again in case the address is manipulated by the above logic
addressField.setText(address);
switch (httpMethodBox.getValue()) {
case "GET":
if (getRequest == null)

View file

@ -1,3 +1,19 @@
/*
* Copyright 2018 Rohit Awate.
*
* 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 com.rohitawate.everest.controllers.codearea;
import com.rohitawate.everest.controllers.codearea.highlighters.Highlighter;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2018 Rohit Awate.
*
* 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 com.rohitawate.everest.controllers.codearea.highlighters;
import org.fxmisc.richtext.model.StyleSpans;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2018 Rohit Awate.
*
* 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 com.rohitawate.everest.controllers.codearea.highlighters;
import org.fxmisc.richtext.model.StyleSpans;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2018 Rohit Awate.
*
* 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 com.rohitawate.everest.controllers.codearea.highlighters;
import org.fxmisc.richtext.model.StyleSpans;

View file

@ -1,3 +1,45 @@
/*
* This highlighter is heavily based on the XMLEditorDemo provided by the contributors of RichTextFX (https://github.com/FXMisc/RichTextFX).
* https://github.com/FXMisc/RichTextFX/blob/master/richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/XMLEditorDemo.java
* RichTextFX is dual-licensed under BSD 2-Clause License and GPLv2 with the Classpath Exception.
*
* Copyright (c) 2013-2017, Tomas Mikula and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Copyright 2018 Rohit Awate.
*
* 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 com.rohitawate.everest.controllers.codearea.highlighters;
import org.fxmisc.richtext.model.StyleSpans;
@ -44,13 +86,13 @@ public class XMLHighlighter implements Highlighter {
lastKwEnd = 0;
Matcher amatcher = ATTRIBUTES.matcher(attributesText);
while (amatcher.find()) {
spansBuilder.add(Collections.emptyList(), amatcher.start() - lastKwEnd);
spansBuilder.add(Collections.singleton("xml_attribute"), amatcher.end(GROUP_ATTRIBUTE_NAME) - amatcher.start(GROUP_ATTRIBUTE_NAME));
spansBuilder.add(Collections.singleton("xml_bracket"), amatcher.end(GROUP_EQUAL_SYMBOL) - amatcher.end(GROUP_ATTRIBUTE_NAME));
spansBuilder.add(Collections.singleton("xml_attribute_value"), amatcher.end(GROUP_ATTRIBUTE_VALUE) - amatcher.end(GROUP_EQUAL_SYMBOL));
lastKwEnd = amatcher.end();
Matcher attributesMatcher = ATTRIBUTES.matcher(attributesText);
while (attributesMatcher.find()) {
spansBuilder.add(Collections.emptyList(), attributesMatcher.start() - lastKwEnd);
spansBuilder.add(Collections.singleton("xml_attribute"), attributesMatcher.end(GROUP_ATTRIBUTE_NAME) - attributesMatcher.start(GROUP_ATTRIBUTE_NAME));
spansBuilder.add(Collections.singleton("xml_bracket"), attributesMatcher.end(GROUP_EQUAL_SYMBOL) - attributesMatcher.end(GROUP_ATTRIBUTE_NAME));
spansBuilder.add(Collections.singleton("xml_attribute_value"), attributesMatcher.end(GROUP_ATTRIBUTE_VALUE) - attributesMatcher.end(GROUP_EQUAL_SYMBOL));
lastKwEnd = attributesMatcher.end();
}
if (attributesText.length() > lastKwEnd)
spansBuilder.add(Collections.emptyList(), attributesText.length() - lastKwEnd);
@ -62,6 +104,7 @@ public class XMLHighlighter implements Highlighter {
}
lastKwEnd = matcher.end();
}
spansBuilder.add(Collections.emptyList(), text.length() - lastKwEnd);
return spansBuilder.create();
}

View file

@ -1,3 +1,19 @@
/*
* Copyright 2018 Rohit Awate.
*
* 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.
*/
/*General rules for EverestCodeArea*/
.everest-code-area {