-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from kolipakakondal/TISTUD-7569
TISTUD-7569 The studio login dialog after entering wrong credentials
- Loading branch information
Showing
6 changed files
with
144 additions
and
6 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
plugins/com.aptana.core/src/com/aptana/core/resources/ISocketMessageHandlerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Appcelerator Studio | ||
* Copyright (c) 2016 by Appcelerator, Inc. All Rights Reserved. | ||
* Proprietary and Confidential - This source code is not for redistribution | ||
*/ | ||
package com.aptana.core.resources; | ||
|
||
/** | ||
* @author Kondal Kolipaka | ||
*/ | ||
public interface ISocketMessageHandlerListener | ||
{ | ||
/** | ||
* Upon request cancelled, update the listeners which are registered. | ||
*/ | ||
public void notifyRequestCancelled(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
plugins/com.aptana.core/src/com/aptana/core/resources/ISocketMessagesHandlerNotifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Appcelerator Studio | ||
* Copyright (c) 2016 by Appcelerator, Inc. All Rights Reserved. | ||
* Proprietary and Confidential - This source code is not for redistribution | ||
*/ | ||
package com.aptana.core.resources; | ||
|
||
/** | ||
* @author Kondal Kolipaka | ||
*/ | ||
public interface ISocketMessagesHandlerNotifier | ||
{ | ||
/** | ||
* @param listener | ||
*/ | ||
public void addListener(ISocketMessageHandlerListener listener); | ||
|
||
/** | ||
* @param listener | ||
*/ | ||
public void removeListener(ISocketMessageHandlerListener listener); | ||
|
||
/** | ||
* Update the registered listeners. | ||
*/ | ||
public void update(); | ||
} |
33 changes: 33 additions & 0 deletions
33
plugins/com.aptana.core/src/com/aptana/core/resources/RequestCancelledException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Appcelerator Studio | ||
* Copyright (c) 2016 by Appcelerator, Inc. All Rights Reserved. | ||
* Proprietary and Confidential - This source code is not for redistribution | ||
*/ | ||
package com.aptana.core.resources; | ||
|
||
/** | ||
* @author Kondal Kolipaka | ||
*/ | ||
public class RequestCancelledException extends Exception | ||
{ | ||
private static final long serialVersionUID = 1998245433598939429L; | ||
|
||
public RequestCancelledException() | ||
{ | ||
} | ||
|
||
public RequestCancelledException(String message) | ||
{ | ||
super(message); | ||
} | ||
|
||
public RequestCancelledException(Exception e) | ||
{ | ||
super(e); | ||
} | ||
|
||
public RequestCancelledException(String message, Exception e) | ||
{ | ||
super(message, e); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
plugins/com.aptana.core/src/com/aptana/core/resources/SocketMessagesHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Appcelerator Studio | ||
* Copyright (c) 2016 by Appcelerator, Inc. All Rights Reserved. | ||
* Proprietary and Confidential - This source code is not for redistribution | ||
*/ | ||
package com.aptana.core.resources; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Kondal Kolipaka | ||
*/ | ||
public abstract class SocketMessagesHandler implements ISocketMessagesHandler | ||
{ | ||
private List<ISocketMessageHandlerListener> listeners; | ||
|
||
public SocketMessagesHandler() | ||
{ | ||
listeners = new ArrayList<ISocketMessageHandlerListener>(); | ||
} | ||
|
||
public void addListener(ISocketMessageHandlerListener listener) | ||
{ | ||
listeners.add(listener); | ||
} | ||
|
||
public void update() | ||
{ | ||
for (ISocketMessageHandlerListener listener : listeners) | ||
{ | ||
listener.notifyRequestCancelled(); | ||
} | ||
} | ||
|
||
public void removeListener(ISocketMessageHandlerListener listener) | ||
{ | ||
listeners.remove(listener); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters