Skip to content

Commit e30066e

Browse files
committed
fix indent
1 parent eea4463 commit e30066e

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQView.java

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -110,52 +110,53 @@ private void setupAuthStatusListeners() {
110110
AuthUtils.addAuthStatusChangeListener(amazonQCommonActions.getFeedbackDialogContributionAction());
111111
}
112112

113-
/**
114-
* Sets up virtual host mapping for the given path using jetty server
115-
* @param jsPath
116-
* @return server launched
117-
*/
118-
protected Server setupVirtualServer(String jsPath) {
119-
Server server = null;
120-
try {
121-
server = new Server(0);
122-
var servletContext = new ContextHandler();
123-
servletContext.setContextPath("/");
124-
servletContext.addVirtualHosts(new String[]{"localhost"});
125-
126-
var handler = new ResourceHandler();
127-
128-
ResourceFactory resourceFactory = ResourceFactory.of(server);
129-
handler.setBaseResource(resourceFactory.newResource(jsPath));
130-
handler.setDirAllowed(true);
131-
servletContext.setHandler(handler);
132-
133-
server.setHandler(servletContext);
113+
/**
114+
* Sets up virtual host mapping for the given path using jetty server
115+
*
116+
* @param jsPath
117+
* @return server launched
118+
*/
119+
protected Server setupVirtualServer(String jsPath) {
120+
Server server = null;
121+
try {
122+
server = new Server(0);
123+
var servletContext = new ContextHandler();
124+
servletContext.setContextPath("/");
125+
servletContext.addVirtualHosts(new String[] { "localhost" });
126+
127+
var handler = new ResourceHandler();
128+
129+
ResourceFactory resourceFactory = ResourceFactory.of(server);
130+
handler.setBaseResource(resourceFactory.newResource(jsPath));
131+
handler.setDirAllowed(true);
132+
servletContext.setHandler(handler);
133+
134+
server.setHandler(servletContext);
134135
server.start();
135-
136+
136137
return server;
137-
138+
138139
} catch (Exception e) {
139140
stopVirtualServer(server);
140141
PluginLogger.error("Error occurred while attempting to start a virtual server for " + jsPath, e);
141142
return null;
142143
}
143-
}
144+
}
144145

145-
protected void stopVirtualServer(Server server) {
146-
if(server != null) {
147-
try {
146+
protected void stopVirtualServer(Server server) {
147+
if (server != null) {
148+
try {
148149
server.stop();
149-
} catch (Exception e) {
150+
} catch (Exception e) {
150151
PluginLogger.error("Error occurred when attempting to stop the virtual server", e);
151152
}
152-
}
153+
}
153154
}
154155

155156
@Override
156-
public final void setFocus() {
157+
public final void setFocus() {
157158
browser.setFocus();
158-
}
159+
}
159160

160161
/**
161162
* Disposes of the resources associated with this view.

0 commit comments

Comments
 (0)