Skip to content

Commit

Permalink
Merge branch 'main' into auto-trigger-loggedin-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dingfeli authored Dec 12, 2024
2 parents 68c41a0 + d1bb152 commit ed8d21c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@
class="software.aws.toolkits.eclipse.amazonq.views.actions.InlineQueryStatusBarContribution"
id="software.aws.toolkits.eclipse.amazonq.views.actions.InlineQueryStatusBarContribution"
>
<visibleWhen checkEnabled="false">
<with variable="is_logged_in">
<equals value="true"/>
</with>
</visibleWhen>
</control>
</toolbar>
</menuContribution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package software.aws.toolkits.eclipse.amazonq.views.actions;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
Expand All @@ -25,7 +27,20 @@ public InlineQueryStatusBarContribution() {

@Override
protected Control createControl(final Composite parent) {
GridData parentData = new GridData(SWT.FILL, SWT.FILL, true, false);
parentData.verticalIndent = 0;
parent.setLayoutData(parentData);

GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginLeft = 1;
layout.marginRight = 1;
layout.horizontalSpacing = 0;
layout.verticalSpacing = 0;
parent.setLayout(layout);

statusLabel = new Label(parent, SWT.NONE);
statusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
statusLabel.setText(IDLE_STATUS);
QInvocationSession session = QInvocationSession.getInstance();
session.assignQueryingCallback(new Runnable() {
Expand Down

0 comments on commit ed8d21c

Please sign in to comment.